[PATCH] sectiongroup support
Shankar Kalpathi Easwaran
shankarke at gmail.com
Thu Mar 13 20:24:36 PDT 2014
I dont think the multithreaded model of processing all the object files first is going to work with the ELF linker, as resolution happens in the way input files are processed from command line.
This is what I see with the GNU linker :-
a) The groups are being resolved as and when input files are processed by the resolver. We cannot delay processing the group members after the resolver has processed all files.
b) Consider the below example :-
ELF foo.o contains
section 1: SHT_GROUP , name=“g1”, content=3
section 3:
symbol: name=“global-f1”, size=30
symbol: name=“global-f2”, size=16
ELF bar.o contains:
section 1: SHT_GROUP , name=“g1”, content=3
section 3:
symbol: name=“global-f1”, size=30
symbol: name=“global-f2”, size=16
symbol: name=“global-f3”, size=16
ELF libarchive.a contains
symbol: name=“global-f3”, size=30
With the command line ld foo.o bar.o libarchive.a, when symbols from bar.o are processed, **global-f3 becomes a undefined symbol** and pulls the global-f3 from libarchive.a
How do we handle all these cases with lld ?
http://llvm-reviews.chandlerc.com/D2961
More information about the llvm-commits
mailing list