Displaying 4 results from an estimated 4 matches for "examinesect".
2012 Dec 07
0
[LLVMdev] Need to create symbols only once
...win's ld64 linker, but even more general. Any binary can do the following to introspect itself:
struct stuff { int a; int b; };
extern struct stuff* stuff_start __asm("section$start$__DATA$__my");
extern struct stuff* stuff_end __asm("section$end$__DATA$__my");
void examineSection() {
const struct stuff* p;
for (p = stuff_start; p < stuff_end; ++p) {
// do stuff with p
}
}
That is, there are magic symbol names which reference the beginning or ending of any particular section. To support this, the linker lazily creates atoms when references to these magic symbol...
2012 Dec 07
3
[LLVMdev] Need to create symbols only once
Hi Nick,
We have few symbols like __bss_start, __bss_end, which are Undefined
symbols in the code.
I want a way in the Reader to create specific atoms before the linker
bootstraps.
I didnt find a way to do that with the existing interfaces.
The way it needs to work is as below :-
1) ReaderELF creates Absolute symbols (for __bss_start, __bss_end etc)
2) ReaderELF reads each file and adds
2013 Jan 07
1
[LLVMdev] Need to create symbols only once
...more general. Any binary can do the following to introspect itself:
>
> struct stuff { int a; int b; };
>
> extern struct stuff* stuff_start __asm("section$start$__DATA$__my");
> extern struct stuff* stuff_end __asm("section$end$__DATA$__my");
>
> void examineSection() {
> const struct stuff* p;
> for (p = stuff_start; p < stuff_end; ++p) {
> // do stuff with p
> }
> }
>
> That is, there are magic symbol names which reference the beginning or ending of any particular section. To support this, the linker lazily creates atoms whe...
2012 Dec 10
1
[LLVMdev] Need to create symbols only once
...more general. Any binary can do the following to introspect itself:
>
> struct stuff { int a; int b; };
>
> extern struct stuff* stuff_start __asm("section$start$__DATA$__my");
> extern struct stuff* stuff_end __asm("section$end$__DATA$__my");
>
> void examineSection() {
> const struct stuff* p;
> for (p = stuff_start; p < stuff_end; ++p) {
> // do stuff with p
> }
> }
>
> That is, there are magic symbol names which reference the beginning or ending of any particular section. To support this, the linker lazily creates atoms whe...