Create only one section for a name in LinkerScript.
authorRui Ueyama <ruiu@google.com>
Fri, 12 Aug 2016 03:16:56 +0000 (03:16 +0000)
committerRui Ueyama <ruiu@google.com>
Fri, 12 Aug 2016 03:16:56 +0000 (03:16 +0000)
commit0b9ce6a48a05fa023962f6f578908521aa9538f4
tree2361992dc8894a1ce66a8efab1e279d94645ae47
parent7b76d81bdf82578757e462dc9bf26da197f70372
Create only one section for a name in LinkerScript.

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
lld/ELF/LinkerScript.cpp
lld/ELF/LinkerScript.h
lld/test/ELF/linkerscript/linkerscript-phdrs.s
lld/test/ELF/linkerscript/linkerscript-repsection-va.s