- Aug 19, 2016
-
-
George Rimar authored
This patch is opposite to D19024, which made this symbols to be hidden by default. Unfortunately FreeBSD loader wants to see start_set_modmetadata_set/stop_set_modmetadata_set in the dynamic symbol table. They were not placed there because had hidden visibility. Patch makes them to have default visibility again. Differential revision: https://reviews.llvm.org/D23552 llvm-svn: 279262
-
George Rimar authored
Previously DT_PREINIT_ARRAYSZ, DT_INIT_ARRAYSZ and DT_FINI_ARRAYSZ were set to zero when lincerscript was used becase sections sizes are calculated later that were taken. Patch delays values calculation for these entries. Testcase is provided. Differential revision: https://reviews.llvm.org/D23663 llvm-svn: 279258
-
George Rimar authored
You can force input section alignment within an output section by using SUBALIGN. The value specified overrides any alignment given by input sections, whether larger or smaller. SUBALIGN is used in many projects in the wild. Differential revision: https://reviews.llvm.org/D23063 llvm-svn: 279256
-
George Rimar authored
Spec says "A hidden symbol contained in a relocatable object must be either removed or converted to STB_LOCAL binding by the link-editor when the relocatable object is included in an executable file or shared object". But we previously converted symbols to STB_LOCAL even when -r was specified. Broken binary was produced, this is PR28967, patch fixes the issue. Differential revision: https://reviews.llvm.org/D23514 llvm-svn: 279220
-
- Aug 18, 2016
-
-
Petr Hosek authored
We should always include symbol name when reporting relocations error to simplify debugging of these issues. Without symbol names users have to manually investigate which of the libraries contain invalid relocations which can be cumbersome when linking multiple libraries. Differential Revision: https://reviews.llvm.org/D23690 llvm-svn: 279162
-
Simon Atanasyan authored
llvm-svn: 279119
-
Simon Atanasyan authored
llvm-svn: 279118
-
George Rimar authored
llvm-svn: 279060
-
George Rimar authored
llvm-svn: 279059
-
Ed Maste authored
Differential Revision: https://reviews.llvm.org/D23124 llvm-svn: 279058
-
Eugene Leviant authored
llvm-svn: 279036
-
Petr Hosek authored
We only support assignments inside SECTIONS, but this does not match the behavior of GNU linker which also allows them outside SECTIONS. The only restriction on assignments outside SECTIONS is that they cannot reference . (they have to be absolute expressions). Differential Revision: https://reviews.llvm.org/D23598 llvm-svn: 279033
-
Petr Hosek authored
This option can be used to specify the stack size of the PT_GNU_STACK segment. Differential Revision: https://reviews.llvm.org/D23538 llvm-svn: 279013
-
- Aug 17, 2016
-
-
Rui Ueyama authored
Now that they are identical. llvm-svn: 278953
-
George Rimar authored
llvm-svn: 278931
-
George Rimar authored
Attemp to fix linux build bot after r278911 ("[ELF] - linkerscript AT keyword (in output section description) implemented.") http://lab.llvm.org:8011/builders/lld-x86_64-darwin13/builds/26289/steps/build_Lld/logs/stdio llvm-svn: 278914
-
George Rimar authored
The linker will normally set the LMA equal to the VMA. You can change that by using the AT keyword. The expression lma that follows the AT keyword specifies the load address of the section. Patch implements this keyword. Differential revision: https://reviews.llvm.org/D19272 llvm-svn: 278911
-
Michael J. Spencer authored
The FreeBSD kernel relies on this behavior to not overwrite the boot loader. llvm-svn: 278889
-
- Aug 16, 2016
-
-
Ed Maste authored
llvm-svn: 278819
-
George Rimar authored
Previously lld showed version number and returned, that is different from ld and PR28999. Patch fixed that. llvm-svn: 278797
-
Eugene Leviant authored
llvm-svn: 278781
-
Petr Hosek authored
This add support for HIDDEN command which can be used to define a symbol that will be hidden and won't be exported. Differential Revision: https://reviews.llvm.org/D23534 llvm-svn: 278770
-
- Aug 15, 2016
-
-
Eugene Leviant authored
llvm-svn: 278663
-
Eugene Leviant authored
llvm-svn: 278657
-
- Aug 12, 2016
-
-
George Rimar authored
Previously we searched output section by name to assign VA. That did not work in the case when multiple output sections with different constraints were defined in script. Testcase shows the possible issue scenario, patch fixes the issue. Differential revision: https://reviews.llvm.org/D23451 llvm-svn: 278561
-
George Rimar authored
After latest changes we combine input sections with different attributes into single output section. Problem here is that regular output sections does not support adding mergeable input sections (and vise versa). Patch just temporarily disables merging for now at the same way we do for -O0 for example. This change helps for linking FreeBSD kernel. Differential revision: https://reviews.llvm.org/D23447 llvm-svn: 278555
-
George Rimar authored
After 278461 "Create only one section for a name in LinkerScript." this loop is excessive. Patch also reorders code slightly to use early return. Differential revision: https://reviews.llvm.org/D23442 llvm-svn: 278554
-
George Rimar authored
We found that GNU assembler 2.17.50 [FreeBSD] 2007-07-03 could generate broken objects. STT_SECTION symbols can be associated with SHT_REL[A]/SHT_SYMTAB/SHT_STRTAB sections. This is PR28868, patch fixes handling of such files. Differential revision: https://reviews.llvm.org/D23201 llvm-svn: 278550
-
George Rimar authored
Previously filtering that was used worked incorrectly. For example for next script it would just remove both sections completely: SECTIONS { . = 0x1000; .aaa : ONLY_IF_RW { *(.aaa.*) } . = 0x2000; .aaa : ONLY_IF_RO { *(.aaa.*) } } Patch fixes above issues and adds testcase showing the issue. Testcase is a subset of FreeBSD script which has: .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) } ... .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) } Differential revision: https://reviews.llvm.org/D23326 llvm-svn: 278486
-
Simon Atanasyan authored
This section supersedes .reginfo and .MIPS.options sections. But for now we have to support all three sections for ABI transition period. llvm-svn: 278482
-
Simon Atanasyan authored
llvm-svn: 278480
-
Rui Ueyama authored
llvm-svn: 278473
-
Rui Ueyama authored
We have getSectionSize for SIZEOF command. So, I think getHeaderSize is a better name for SIZEOF_HEADERS. llvm-svn: 278470
-
Rui Ueyama authored
llvm-svn: 278465
-
Rui Ueyama authored
Previously, we were setting LayoutInputSection's OutputSection member in createSections. Because when we create LayoutInputSectinos, we don't know the output section for them, so we backfilled the member in the function. This patch moves the code to backfill it to assignOffsets. llvm-svn: 278464
-
Rui Ueyama authored
llvm-svn: 278462
-
Rui Ueyama authored
Previously, we created two or more output sections if there are input sections with the same name but with different attributes. That is a wrong behavior. This patch fixes the issue. One thing we need to do is to merge output section attributes. Currently, we create an output section based on the first input section's attributes. This may make a wrong output section attributes. What we need to do is to bitwise-OR attributes. We'll do it in a follow-up patch. llvm-svn: 278461
-
Rui Ueyama authored
llvm-svn: 278453
-
Rui Ueyama authored
One reason why we are (ab)using OutputSectionFactory class is because it owns output sections. Technically there's no need to have it own sections. So, this patch transfers the ownership to Out<ELFT>. llvm-svn: 278452
-
Rui Ueyama authored
The reason why we had to assign offsets only to sections that don't contain layout sections were unclear. It turned out that we can live without it. llvm-svn: 278449
-