Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ELF] - Recommit "[ELF] - Make Bss and BssRelRo sections to be synthe…
…tic (#3)." Was fixed, details on review page. Original commit message: That removes CopyRelSection class completely, making Bss/BssRelRo to be just regular synthetics. This is splitted from D30541 and polished. Difference from D30541 that all logic of SharedSymbol converting to DefinedRegular was removed for now and probably will be posted as separate patch. Differential revision: https://reviews.llvm.org/D30892 llvm-svn: 298062
- Loading branch information
George Rimar
committed
Mar 17, 2017
1 parent
872305e
commit 1ab9cf4
Showing
10 changed files
with
98 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
.data | ||
.global foo | ||
.type foo, @object | ||
.align 8 | ||
.size foo, 8 | ||
foo: | ||
.quad 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# REQUIRES: x86 | ||
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o | ||
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux \ | ||
# RUN: %p/Inputs/relocation-copy-align-common.s -o %t2.o | ||
# RUN: ld.lld -shared %t2.o -o %t.so | ||
# RUN: ld.lld %t.o %t.so -o %t3 | ||
# RUN: llvm-readobj -s -r --expand-relocs %t3 | FileCheck %s | ||
|
||
# CHECK: Section { | ||
# CHECK: Index: | ||
# CHECK: Name: .bss | ||
# CHECK-NEXT: Type: SHT_NOBITS | ||
# CHECK-NEXT: Flags [ | ||
# CHECK-NEXT: SHF_ALLOC | ||
# CHECK-NEXT: SHF_WRITE | ||
# CHECK-NEXT: ] | ||
# CHECK-NEXT: Address: 0x203000 | ||
# CHECK-NEXT: Offset: 0x20B0 | ||
# CHECK-NEXT: Size: 16 | ||
# CHECK-NEXT: Link: 0 | ||
# CHECK-NEXT: Info: 0 | ||
# CHECK-NEXT: AddressAlignment: 8 | ||
# CHECK-NEXT: EntrySize: 0 | ||
# CHECK-NEXT: } | ||
|
||
# CHECK: Relocations [ | ||
# CHECK-NEXT: Section {{.*}} .rela.dyn { | ||
# CHECK-NEXT: Relocation { | ||
# CHECK-NEXT: Offset: 0x203008 | ||
# CHECK-NEXT: Type: R_X86_64_COPY | ||
# CHECK-NEXT: Symbol: foo | ||
# CHECK-NEXT: Addend: 0x0 | ||
# CHECK-NEXT: } | ||
# CHECK-NEXT: } | ||
# CHECK-NEXT: ] | ||
|
||
.global _start | ||
_start: | ||
.comm sym1,4,4 | ||
movl $5, foo |