[LLVMdev] Need to create symbols only once

Shankar Easwaran shankare at codeaurora.org
Fri Dec 7 11:51:30 PST 2012


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 Atoms to the list
3) If the atoms the linker defined were Global, the atoms that the 
Reader created should get overridden with the linker created ones.

This may also be needed to pul in specific symbols from archive 
libraries, too.

I was thinking to add an interface to ReaderELF which would be called by 
the driver, but the problem is the DefinedAtom/AbsoluteAtom have which 
file owns the atom.

I was discussing with Michael on this, and he was proposing to add a 
Pre-Read file.

Do you have any other opinions too ?

Thanks

Shankar Easwaran

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by the Linux Foundation




More information about the llvm-dev mailing list