Equivalent of GCC ld's --wrap

Hi
I need to find an equivalent to using gcc ld's --wrap option, e.g. with gcc
if I call ld with -Wl,--wrap,malloc, calls to malloc will instead be directed to _wrapmalloc. If I want to call the original malloc I can explicitly call _realmalloc.
With cctools ld (aka Apple's ld), there is no --wrap option. I can get halfway by using the "-idefinition:indirect" option using mangled symbol names, so can happily redirect malloc/whatever to my own function. However, I'm stuggling to find a solution so that I can call the original function.
Anyone got any ideas?
thanks
twoohnine

Instead of messing with (essentially) aliasing one function to another, why not just write the function you want with the name already being used? That is, write a malloc() that does whatever wrapping, and write a _realmalloc() that is just a simple wrapper that calls the "real" malloc()? You can use dlsym() to access the malloc() function in a linked library instead of the one in the thing calling it (i.e., avoid infinite recursion).

Similar Messages

  • What's In The Kit?

    I must say the performance of the fulfillment house has me chewing my nails.  It took them days to do the simple act of processing a credit card and since then three days have passed and still no shipment.  GRRRrrrrrrr.
    But I would like a jump on what we are getting.  Mark, here are the questions:
    Is a complete set of Lenovo drivers and apps included on the disk?  I ask this with clean install in mind--ie formatting the disk, which wipes out what is there and replacement with the new o/s and full set of software/drivers for the machine.
    Do the disks include an update for the BIOS or is that something we do before any install begins?
    If the disks don't have a full set of drivers and Lenovo apps are we supposed to download them from somewhere?  If so where?
    Finally a very personal question.  I have a T500 which had a disk failure.  It now has had the hard drive replaced and I restored the system with the Lenovo restore disks (version Vista Business 64).  I have not done ANYTHING further to the machine awaiting this software.  Obviously a clean install is the best route since no applications or data has been moved onto the machine.  Your advice please on best route to take.
    Thanks

    sfoeuroflyer,
    Sorry that you didn't receive the answer to your post within 24 hours - please keep in mind the forum is full of a lot of questions and is ostensibly peer to peer support.  Thanks for  sharing the feedback from the IBM support center technican.
    To Paradox183's question...
    I'd like to clarify that the upgrade kit is equivalent to buying a shrink wrap Windows 7, doing the install and then adding all the Lenovo drivers.  There is added benefit of using the enhanced experienced drivers included, but it is not an exact match of a Lenovo factory preload image for systems shipping with Windows 7 pre-installed (after Oct 22) as we've noted in other threads.
    Mark
    ThinkPads: S30, T43, X60t, X1, W700ds, IdeaPad Y710, IdeaCentre: A300, IdeaPad K1
    Mark Hopkins
    Program Manager, Lenovo Social Media (Services)
    twitter @lenovoforums
    English Community   Deutsche Community   Comunidad en Español   Русскоязычное Сообщество

  • Clip Wrap equivalent for Windows

    Anyone know of a program for Windows (7) that works like ClipWrap does on a Mac?
    Clip Wrap (Divergent Media)  them selves are not interested in porting it.  I contacted them.
    Whatever..I have a need for this.
    For those that dont know..Clip Wrap does not transcode..it simply rewraps the header, flags etc....
    Fast and efficient ( and it has a great Splash Screen) !

    iDealshare VideoGo is just the ideal ClipWrap for Window or Mac equivalent which can convert AVCHD, MTS, M2TS, M2T, HDV, MXF, Apple ProRes, MOD, TOD, MPG, MP4, MOV, MKV, XAVC, R3D, FLV, WebM etc to Windows more supported video format like AVI, WMV, ASF, DV, MPG for import to Windows Movie Maker, Adobe Premiere, Sony Vegas, Windows Media Player and other devices.

  • How can I force text in a table to wrap at the margin? Chinese characters result in wide tables.

    Hello all ye RoboHelpers out there.
    Background:
    We're using RH 9 (latest patch) on Windows 7 machine.
    We document in English and then the RH project gets localized into many diff languages and we use that to generate CHM, and Printed outputs.
    The Problem:
    In the Chinese language, in printed output, the right border of most tables exeeds well beyond the margin.
    Here's what the localized table looks like in the RH editor:
    By comparison, here's the equivalent English topic prior to localization:
    Our CHM output is fine. In fact, here's what the Chinese looks like in when output to a browser or previewed and I drag the right side to
    a narrower width. Notice that the table text appropriately wraps to remain within the window's size:
    But here's what it looks like when I generate it in Word's printed output:
    Notice the location of the margin at 6.5 inches. It should be wrapping at the margin. And something is weird with the left cell how it's getting pushed so far to the right.
    The actual table width ends up around 11 inches! I had some tables last time I did this that were as far out as 18 inches but looked perfectly fine in English!
    We use Across Systems for our localization tool, and I've verified that our translators are not messing with the table properties at all; only the text is exposed. One interesting difference I've noticed from other languages, is that Chinese characters do not contain a true space or period characters when we get them back from localization. This makes sentences essentially a really long string of unbroken characters, and I suspect this somehow pushes the generated tables to wide extremes in printed output.
    What I've Tried:
    I've tried to change the table properties in Word to auto fit the size of the window.
    I've tried setting the width in RH to a specific size and regenerating. Still doesn't help.
    I've added in space character and doing that does cause lines to wrap in some cases, but not in all. But I shouldn't have to do this.
    I've tried to create a VBA macro in Word to size the tables, but couldn't get it to work.
    What I need:
    I need to somehow globally force all the tables' text strings to wrap once they reaches the right margin no mater what, even if the line does not contain space characters. Is there a setting I'm missing somewhere, either on the RH side or the Word side that can do this for these long strings of characters?
    I really hope someone else has figured out how to deal with this because last time I did this, I had to go through approximately 500 tables and manually do a very convoluted workaround dragging the table handle in Print layout mode back to the right margin to get the table to wrap appropriately. It was a major pain in neck!
    Many thanks in a advance for any ideas you might have.

    I wonder the Format Tables macros on my site could be adapted?
    http://www.grainge.org/pages/authoring/word/word_macros.htm
    If not, I have used Macro Express to format tables in Rh. No reason it could not be used in Word.
    See www.grainge.org for RoboHelp and Authoring tips
    @petergrainge

  • Replace special characters in xml to its HTML equivalent

    Hello All,
    I did a small xml processor which will parse the given xml document and retrieves the necessary values. I used XPath with DocumentBuilder to implement the same.
    The problem which had faced initially was, i could not able parse the document when the value comes with the '&' special character. For example,
    <description>a & b</description>I did some analysis and found that the '&' should be replaced with its corresponding HTML equivalent
    &amp; So the problem had solved and i was able to process the xml document as expected. I used the replaceAll() method to the entire document.
    Then i thought, there would be some other special character which may cause the same error in future. I found '<' is also will cause the same kind of error. For example,
    <description>a < b</description>Here i couldn't able to use the replaceAll(), because even the '<' in the xml element tags was replaced. So i was not able to parse the xml document.
    Did anyone face this kind of issue? Can anyone help me to get rid of this issue.
    Thanks
    kms

    Thats the thing about XML. It has to be correct, or it doesn't pass the gate. This is nothing really, seen it many times before. It becomes funny when you start to run into character set mismatches.
    In this case the XML data should have either been escaped already, or the data should have been wrapped in cdata blocks, as described here:
    http://www.w3schools.com/xml/xml_cdata.asp
    Manually "fixing" files is not what you want to be doing. The file has to be correct according to the very simple yet strict XML specifications, or it isn't accepted.

  • Are These Two Event Handler Examples Equivalent?

    I have found 2 examples of adding an event handler in C#.  The even handler is (obviously) the method named b2_FlashProgressChanged.  Are both of these two forms valid and equivalent?
    BackgroundWorker bw = new BackgroundWorker();
    bw.ProgressChanged += bw_FlashProgressChanged;
    bw.ProgressChanged += new ProgressChangedEventHandler(this.bw_FlashProgressChanged);
    private void bw_FlashProgressChanged(object sender, ProgressChangedEventArgs e)
    MCSD .NET developer in Dallas, Texas

    Yes. In the initial releases of C# the compiler could not infer the type of a method given just its name so you had to explicitly wrap it in event handler. But a long time back the compiler was updated to allow for type inferencing such that the compiler
    can verify that a method name matches the signature of a delegate and therefore does not need the explicit conversion anymore. You should prefer the first syntax when possible as it is less typing and easier to read IMO.
    Michael Taylor
    http://blogs.msmvps.com/p3net

  • Word wrapping in urxvt

    Hi,
    Is there a way to wrap words the way gnome-terminal does in urxvt ?
    If so I would really like to know how.
    Thanks

    pyarch wrote:
    jasonwryan wrote:Zsh uses setopt, and there is no equivalent. Your term or your prompt is likely broken.
    I am using rxvt-unicode with zsh but when I go into bash the shopt works
    So it is probably your prompt...

  • ObservableValue: a value to-be or to-wrap-only?

    Hi experts,
    it's a question which turned up in the other thread:
    ObservableList: notification on property changes of contained elements?
    as a code snippet (just for clarity, if allowed, it would extend the one or other implementing class):
    public Person implements ObservableValue<Person> {
           @Override
           public Person getValue() {
                return this;
    } the basic idea (Darryl's - and I'm delighted by it : - ) is to have an in-system handle for getting notified whenever any property of the object changes - the Swing equivalent would be to register a PropertyChangeListener and trigger some update independent of the propertyName.
    API doc says: "is an entity that wraps a value" - taken literally, the above wouldn't be allowed .. ideas?
    Thanks
    Jeanette

    Hi,
    am not expert but I dig a lot with API doc.
    try instead
           @Override
           public Person getValue() {
                return this;
           }this :
           @Override
           public Person getValue() {
                return get();
           }Why implementing ObservableValue while you can extend ObservableValueBase?
    Api doc says :
    "A convenience class for creating implementations of ObservableValue. It contains all of the infrastructure support for value invalidation- and change event notification. This implementation can handle adding and removing listeners while the observers are being notified, but it is not thread-safe."
    You can read rest here http://download.oracle.com/javafx/2.0/api/javafx/beans/value/ObservableValueBase.html
    Or maybe you should try extending ObjectPropertyBase class http://download.oracle.com/javafx/2.0/api/javafx/beans/property/ObjectPropertyBase.html
    Both of these classes implement ObservableValue.
    Hope it helps.

  • Wrapping and unwrapping source code

    Hi All,
    I'm having a security issue. I wanna do some wrapping thing for database objects like procedures,packages and functions.
    can anybody tell me how can i wrap my source codes. And also how can i unwrap these wrapped codes whenever i need..???
    can anybody help me to solve this issue please.
    Thanks in advance,
    Max

    Dear Max,
    if you have wrapped code, you can use this url: http://hz.codecheck.ch/UnwrapIt/Unwrap.jsp
    and unwrapped code.
    If you want wrap your code, just read:
    c:\ora9i\bin> wrap iname=input_file_name
    Running the Wrap Utility
    To run the Wrap Utility, enter the wrap command at your operating system prompt using the following syntax:
    wrap iname=input_file [oname=output_file]
    Leave no space around the equal signs because spaces delimit individual arguments.
    The wrap command requires only one argument, which is
    iname=input_file
    where input_file is the name of the Wrap Utility input file. You need not specify the file extension because it defaults to sql. For example, the following commands are equivalent:
    wrap iname=/mydir/myfile
    wrap iname=/mydir/myfile.sql
    However, you can specify a different file extension as the following example shows:
    wrap iname=/mydir/myfile.src

  • Execute wrapped .plb file using JDBC

    We have a wrapped PL/SQL stired procedure that we would like to execute through our application that uses JDBC to connect to our repository database which resides on Oracle 9.2.
    Using JDBC, we can issue statements like:
    create or replace procedure my_proc(
    var1 in varchar2,
    var2 out varchar2) as ......
    What we really need is the equivalent of Sql*Plus, where using Sql*Plus we could do the following:
    SQL >@<file_location><script_file.plb>
    where script_file.plb is a wrapped PL/SQL create or replace script.
    Is there any way possible that this can be done ? If so please email this documenation or a link to it to me: [email protected]
    Thanks.
    Ferenc

    Ferenc,
    Read the file contents into a "String" and then invoke the "executeUpdate()" method (of "java.sql.Statement") using the "String".
    Alternatively, use the "exec()" method (of "java.lang.Runtime") to execute "SQL*Plus", for example:
    String[] cmd = new String[]{"path_to/sqlplus","@file"};
    Runtime.getRuntime().exec(cmd);Note that above code is from memory only. Please verify using "javadoc" documentation.
    Good Luck,
    Avi.

  • Standard way to en/decrypt using PKI wrapped symetric key

    Is there a standard way to benefit from a symetric cipher's performance, but also send/wrap its PKI protected, secret key in the same stream (or array, etc)? Or, does one have to manually construct some protocol to do this, ala PKI encrypt a key and prepend it s known length to the cipher text/stream, and reverse on the other end?
    What I'm basically looking for a general purpose equivalent to SSL, except applicable to non-network operations also (and one that doesnt neccesarily have two way cipher/key negotiation)

    Use the PKCS#7 message format ("envelopedData" and "signedData").
    Please check the specification of PKCS#7 (as known as CMS, Cryptographic Message Syntax) in the RFC 3369. There are variations in CMS, like the "Compressed Data Content Type for Cryptographic Message Syntax (CMS)" (RFC 3274) or the "Password-based Encryption for CMS" (RFC 3211).

  • Memset equivalent

    I'm using Forte to wrap a DLL that communicates to a legacy system. The
    communication takes the form of sending and receiving 3000-byte buffers
    divided into fixed length fields (the fields are different depending on
    which legacy API call is being made). When sending data, I need to fill
    in only a handful of fields in the structure with actual data; the rest
    of it needs to be filled with spaces. In the C program I'm using as an
    example, this is handled with a memset. Is there a Forte equivalent to
    the C memset function that I could use to quickly set all characters in
    a string (or TextData, or array of char, or something) to have the same
    value?
    Thanks,
    Tim
    Tim Kannenberg
    Strong Capital Management
    [email protected]
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

    http://java.sun.com/j2se/1.4.1/docs/api/java/util/Arrays.html
    public static void fill(int[] a, int fromIndex, int toIndex, int val)
    should take care of that memset problem.
    memcpy ? i didn't find exact method, but search the api, maybe System has somethint (i didn't look there)
    if you know that iAddress is never more than 255, then you actually don't lose any precision, but the compiler doesn't know that, thats why it is warning you.
    BTW:
    java.lang.System:
    arraycopy(Object src, int srcPos, Object dest, int destPos, int length)
    you wellcome

  • Applescript equivalent to VBA XMLHTTP object?

    Having no luck after hours of research on this. Is there an Applescript equivalent to the VBA XMLHTTP object?
    We have an Excel form that can pass data to a web service. We basically take the XML, wrap it in a SOAP envelope and send it using the xmlhttp object. Unfortunately, the xmlhttp object does not appear to exist for the mac version of Excel. If there is no equivalent to the xmlhttp object, is there an alternate way of making this work in applescript?
    Thanks in advance

    Thanks guys. We were able to solve the problem through Query Tables in VBA rather than resorting to Applescript.
    For anyone interested in the solution:
    Sub URLGetQuery()
    With ActiveSheet.QueryTables.Add(Connection:= _
    "URL;http://mywebservice.com/mywebserviceproc",
    Destination:=Range("a1"))
    .PostText = SoapString
    .BackgroundQuery = True
    .TablesOnlyFromHTML = True
    .Refresh BackgroundQuery:=False
    .SaveData = True
    End With
    End Sub
    Lets you post to a web service without using the xmlhttp object
    Message was edited by: Kennedy27

  • Trimming Top of Main/Wrap Table

    I hope I am able to phrase this question correctly . . .
    First off, I consider myself a Web Design hobbiest - not a
    professional by any stretch of the imagination. The other premise
    is - yes, I know CSS all the rage for web deign these days - but
    for the purposes of this issue, I am using good ole' traditional
    tables.
    I am working in Dreamweaver 8. I set a main/wrap table for my
    entire project - let's say 1024 x 768. I have been designing my
    site within the main tables (with embedded tables and such). I have
    decided that I want to trim some space off of the top of my main
    table and, essentially, have everything within it bump up
    accordingly. (I hope that made some sense). So, in essense, the
    main/wrap table will now be something like a height of 760 (from
    768).
    Is there a way I can accomplish this without having to
    painstakingly reposition all of the embeddeed tables, cells and
    graphics within the main "wrap" table?
    Thanks for any help, insight, or direction you can provide.
    TOM

    > Believe me ... I tried using CSS, using layers and such
    Using layers is definitely not equivalent to using CSS,
    although layers are
    CSS constructions.
    > The problem is, the
    > layout neveer conformed cross platform (all the current
    browsers).
    A well built CSS page can definitely do that - and may not
    have a single
    layer on it - see for example, this page -
    http://66.165.96.216/
    > I'm not diminishing your advise, mind you ... just
    explaining my
    > frustration
    > as it relates to my progress. I've been working ont his
    website
    > (eCommerce)
    > project for many months - and I need to get it out.
    Now - have you not been given a solution to your 'trimming
    top of table'
    question?
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "tcraw1010" <[email protected]> wrote in
    message
    news:[email protected]...
    >
    quote:
    Originally posted by:
    Newsgroup User
    > On Sat, 5 Aug 2006 17:50:50 +0000 (UTC), "tcraw1010"
    >
    > But I have really learnt a lot from this forum, and now
    embrace CSS -
    > not well perhaps - but I'm really trying. So I would
    encourage anyone
    > else in the same position to do likewise. Leave HTML
    only pages
    > behind.
    >
    > I'm now embarking on using PHP as well - and learning a
    lot and
    > hopefully improve my websites as a result.
    >
    >
    >
    > Believe me ... I tried using CSS, using layers and such.
    The problem is,
    > the
    > layout neveer conformed cross platform (all the current
    browsers). It
    > simply
    > got to be way too frustrating and time consuming to try
    to learn
    > everythign I
    > needed to to get my site up and running. Perhaps at some
    point I may have
    > a
    > profesional go over the site and see if he/she can't
    re-qork ti to where
    > it is
    > all CSS . . . but for the time being, using traditional
    tables is getting
    > the
    > job done (for the most part).
    >
    > I'm not diminishing your advise, mind you ... just
    explaining my
    > frustration
    > as it relates to my progress. I've been working ont his
    website
    > (eCommerce)
    > project for many months - and I need to get it out.
    >
    >
    > TOM
    >
    >

  • Wrapping in out points

    i'm asking here cause i don't know where or how else to ask. in final cut pro, i can press 'x' and wrap my in and out points around any clip that my playhead is on. number 1, what is that called? and 2, what's the equivalent in adobe premiere?

    1. 'Mark Clip'
    2. Adobe who?

Maybe you are looking for