Commit Graph

6 Commits

Author SHA1 Message Date
Rafael Espindola 334c3e11e6 Delay the relocation scan.
We have to scan the relaxations after every symbol is defined.

This fixes pr25218.

llvm-svn: 250702
2015-10-19 15:21:42 +00:00
Rui Ueyama 69960baad5 ELF2: Write .interp section on the first page in the exectuable.
Previously, we reserved the first page for the program header, so no
sections would be written to very beginning of the output file.
FreeBSD requires .interp section be exist on the first page, so that
was not good.

This patch calculates the size of the program header and then assign
addresses to the sections. Now the first section is located next to
the program header. Because the first section is .interp, it's very
likely to be on the first page.

llvm-svn: 249957
2015-10-10 23:25:39 +00:00
Rui Ueyama 60fe7fcc6b ELF2: Use ld.lld2 instead of lld -flavor gnu2.
llvm-svn: 249573
2015-10-07 17:31:39 +00:00
Rafael Espindola c05ad3dedb Create linker generated symbols earlier.
We were incorrectly deciding that a dynamic relocation was needed for them.

llvm-svn: 249512
2015-10-07 02:51:44 +00:00
Rafael Espindola cbffa8cc97 Add missing % to t2.so.
llvm-svn: 249505
2015-10-07 02:01:47 +00:00
Michael J. Spencer 95538ca99a [elf2] Add __preinit_array, and __fini_array start and end symbols.
llvm-svn: 249367
2015-10-06 01:16:17 +00:00