Displaying 6 results from an estimated 6 matches for "__wrap_fn".
2013 Sep 13
2
[LLVMdev] [lld] Implementing the aliasing feature
...to model this for ELF for the below functionalities :-
>>
>> a) __wrap
>>
>> For example : --wrap fn
>>
>> What I plan to do here is,
>>
>> create a undefined function fn atom
>> create a defined weak atom fn
>> create a alias reference to __wrap_fn which is a undefined atom.
> I don’t see how those steps will achieve wrapping functionality. Say you are wrapping malloc. There will be a malloc seen at build time from libc, and all references to malloc will bind to it. Adding alternate names won’t stop that binding.
Yes, thats how ld is be...
2013 Sep 13
2
[LLVMdev] [lld] Implementing the aliasing feature
...definition, which is a non
zero sized atom, aliasing will not work.
I was thinking to model this for ELF for the below functionalities :-
a) __wrap
For example : --wrap fn
What I plan to do here is,
create a undefined function fn atom
create a defined weak atom fn
create a alias reference to __wrap_fn which is a undefined atom.
b) --defsym option
For example : --defsym A = B
the defsym option is going to have a undefined atom for A
create a defined weak atom "B" of size 0
create a alias reference to the expression atom, that defines the
expression.
Both (a), (b) would work if ther...
2013 Sep 13
0
[LLVMdev] [lld] Implementing the aliasing feature
...t work.
>
> I was thinking to model this for ELF for the below functionalities :-
>
> a) __wrap
>
> For example : --wrap fn
>
> What I plan to do here is,
>
> create a undefined function fn atom
> create a defined weak atom fn
> create a alias reference to __wrap_fn which is a undefined atom.
I don’t see how those steps will achieve wrapping functionality. Say you are wrapping malloc. There will be a malloc seen at build time from libc, and all references to malloc will bind to it. Adding alternate names won’t stop that binding.
Another way to do wrapping...
2013 Sep 14
0
[LLVMdev] [lld] Implementing the aliasing feature
...alities :-
>>>
>>> a) __wrap
>>>
>>> For example : --wrap fn
>>>
>>> What I plan to do here is,
>>>
>>> create a undefined function fn atom
>>> create a defined weak atom fn
>>> create a alias reference to __wrap_fn which is a undefined atom.
>> I don’t see how those steps will achieve wrapping functionality. Say you are wrapping malloc. There will be a malloc seen at build time from libc, and all references to malloc will bind to it. Adding alternate names won’t stop that binding.
> Yes, thats how...
2013 Sep 13
0
[LLVMdev] [lld] Implementing the aliasing feature
Can an “alias” atom just be a zero sized atom with one reference of kindLayoutBefore to its target? The layout engine should then place the alias atom right before the real atom, so you wind up with two symbols at one address.
-Nick
On Sep 12, 2013, at 3:02 PM, Shankar Easwaran <shankare at codeaurora.org> wrote:
> Hi Nick,
>
> In addition to what you mentioned, I think there
2013 Sep 12
3
[LLVMdev] [lld] Implementing the aliasing feature
Hi Nick,
In addition to what you mentioned, I think there needs a special
*AliasReference* that need to be created which the DefinedAtom points to.
Thanks
Shankar Easwaran
-------- Original Message --------
Subject: Re: [PATCH] Add a fallback mechanism for undefined atom.
Date: Thu, 29 Aug 2013 15:15:49 -0700
From: kledzik at apple.com <kledzik at apple.com>
Reply-To: