hanchenye-llvm-project/lld/test/elf/Inputs
Adhemerval Zanella 9c5831f3de [ELF] Fix wrong TBSS size
This patch fixes the wrong .tbss segment size generated for cases where
multiple modules have non initialized threads variables.  For instance:

* t0.c

__thread int x0;
__thread int x1;
__thread int x2;

extern __thread int e0;
extern __thread int e1;
extern __thread int e2;
extern __thread int e3;

int foo0 ()
{
  return x0;
}

int main ()
{
  return x0;
}

* t1.c

__thread int e0;
__thread int e1;
__thread int e2;
__thread int e3;


lld is generating (for aarch64):

  [14] .tbss             NOBITS           0000000000401000  00001000
       0000000000000010  0000000000000000 WAT       0     0     4

Where is just taking in consideration the largest tbss segment, not all
from all objects.  ld generates a correct output:

  [17] .tbss             NOBITS           0000000000410dec  00000dec
       000000000000001c  0000000000000000 WAT       0     0     4

This issue is at 'lib/ReaderWriter/ELF/SegmentChunks.cpp' where
Segment<ELFT>::assignVirtualAddress is setting wrong slice values, not taking care
of although tbss segments file size does noy play role in other segment virtual
address placement, its size should still be considered.

llvm-svn: 239906
2015-06-17 13:46:07 +00:00
..
abs-test.i386
allowduplicates.objtxt Delete unnecessary generality in loadFile. 2015-04-24 15:51:45 +00:00
bar.o.x86-64
branch-test.hexagon
branch-test.ppc
consecutive-weak-defs.o.yaml Remove trailing whitespace characters. 2015-04-27 17:18:04 +00:00
constants-merge.x86-64
constdata.x86-64
foo.o.x86-64
globalconst.c
globalconst.o.x86-64
gotpcrel.S
gotpcrel.x86-64
group-cmd-search-1.ls [ELF] Fix the file look up algorithm used in the linker script GROUP command. 2014-05-01 16:22:08 +00:00
group-cmd-search-2.ls [ELF] Fix the file look up algorithm used in the linker script GROUP command. 2014-05-01 16:22:08 +00:00
group-cmd-search-3.ls [ELF] Implement parsing `-l` prefixed items in the `GROUP` linker script command. 2014-07-15 17:17:30 +00:00
ifunc.S
ifunc.cpp
ifunc.cpp.x86-64
ifunc.x86-64
libfnarchive.a
libifunc.x86-64.so
libundef.so
libweaksym.so
main-with-global-def.o.yaml Remove trailing whitespace characters. 2015-04-27 17:18:04 +00:00
mainobj.x86_64
no-unique-section-names.x86-64 [ELF] Fix lld when no unique sections is used 2015-05-24 16:19:27 +00:00
object-test.elf-hexagon
object-test.elf-i386
phdr.i386
quickdata-sort-test.o.elf-hexagon
quickdata-sortcommon-test.o.elf-hexagon
quickdata-test.elf-hexagon
reloc-test.elf-i386
reloc-xb.x86
reloc-xt.x86
relocs-dynamic.x86-64
relocs.x86-64
responsefile [ELF] Support response file. 2014-03-28 19:34:34 +00:00
rodata-test.hexagon
rodata-test.i386
rodata.c [ELF] Implement --rosegment 2014-09-08 04:05:52 +00:00
rodata.o [ELF] Implement --rosegment 2014-09-08 04:05:52 +00:00
section-test.i386
shared.c
shared.so-x86-64
stripped-empty.x86_64
target-test.hexagon
target-test.ppc
tls-tbss-size.yaml [ELF] Fix wrong TBSS size 2015-06-17 13:46:07 +00:00
tls.S
tls.c
tls.x86-64
tlsAddr.x86-64
tlsaddr.c
undef-from-main-so.c
undef-from-main.c
undef-pc32.o
undef.o
undef2-so.o.yaml Re-commit r218259. 2014-09-22 20:48:04 +00:00
use-shared-32s.c
use-shared-32s.x86-64
use-shared.c Revert "[ELF] Order DT_NEEDED entries by command line order." 2014-03-20 06:57:28 +00:00
use-shared.x86-64
weaksym.o
writersyms.o
x86-64-relocs.S