Files
clang-p2996/lld/ELF
Rafael Espindola 08d6a3f133 Create only one section symbol per section.
Unfortunately some consumers of our .o files produced with -r expect
only one section symbol per section. That is true of at least of go's
own linker.

Combining them is a somewhat convoluted process. We have to create a
symbol for every section since we don't know which ones will be
needed. The relocation sections also have to be written first to
handle the Elf_Rel addend.

I did consider a completely different approach:

We could remove the -r special case of relocation sections when
reading. We would instead have a copyRelocs function that is used
instead of scanRelocs. It would create a DynamicReloc for each
relocation and a RelocationSection for each input relocation section.

A complication of such change is that DynamicReloc would have to take
a section index and a input section instead of a symbol since with
-emit-relocs some DynamicReloc would hold relocations referring to the
dynamic symbol table and other to the static symbol table.

That would be a pretty big change, and if we do it it is probably
better to do it as a refactoring.

llvm-svn: 294816
2017-02-11 01:40:49 +00:00
..
2017-01-26 02:58:59 +00:00
2017-02-01 10:26:03 +00:00
2017-01-13 21:05:46 +00:00
2016-12-18 14:06:06 +00:00
2016-11-05 22:58:01 +00:00
2017-02-03 21:59:15 +00:00
2016-03-12 06:06:40 +00:00