[lld] r330228 - Revert r330223, "COFF: Merge .idata, .didat and .edata into .rdata by default."
Peter Collingbourne via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 17 15:16:39 PDT 2018
Author: pcc
Date: Tue Apr 17 15:16:39 2018
New Revision: 330228
URL: http://llvm.org/viewvc/llvm-project?rev=330228&view=rev
Log:
Revert r330223, "COFF: Merge .idata, .didat and .edata into .rdata by default."
Seems to have uncovered some sort of non-determinism on the bots.
Modified:
lld/trunk/COFF/Driver.cpp
lld/trunk/test/COFF/arm64-relocs-imports.test
lld/trunk/test/COFF/delayimports-armnt.yaml
lld/trunk/test/COFF/delayimports.test
lld/trunk/test/COFF/delayimports32.test
lld/trunk/test/COFF/export-armnt.yaml
lld/trunk/test/COFF/hello32.test
lld/trunk/test/COFF/imports.test
lld/trunk/test/COFF/pdb-publics-import.test
lld/trunk/test/COFF/symtab.test
Modified: lld/trunk/COFF/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/Driver.cpp?rev=330228&r1=330227&r2=330228&view=diff
==============================================================================
--- lld/trunk/COFF/Driver.cpp (original)
+++ lld/trunk/COFF/Driver.cpp Tue Apr 17 15:16:39 2018
@@ -1102,12 +1102,6 @@ void LinkerDriver::link(ArrayRef<const c
for (auto *Arg : Args.filtered(OPT_merge))
parseMerge(Arg->getValue());
- // Add default section merging rules after user rules. User rules take
- // precedence, but we will emit a warning if there is a conflict.
- parseMerge(".idata=.rdata");
- parseMerge(".didat=.rdata");
- parseMerge(".edata=.rdata");
-
// Handle /section
for (auto *Arg : Args.filtered(OPT_section))
parseSection(Arg->getValue());
Modified: lld/trunk/test/COFF/arm64-relocs-imports.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/COFF/arm64-relocs-imports.test?rev=330228&r1=330227&r2=330228&view=diff
==============================================================================
--- lld/trunk/test/COFF/arm64-relocs-imports.test (original)
+++ lld/trunk/test/COFF/arm64-relocs-imports.test Tue Apr 17 15:16:39 2018
@@ -78,8 +78,8 @@
# AFTER: 140001080: 00 20 0e 91 add x0, x0, #904
# AFTER: 140001084: 00 04 40 91 add x0, x0, #1, lsl #12
# AFTER: 140001088: 00 c4 41 f9 ldr x0, [x0, #904]
-# AFTER: 14000108c: 10 00 00 b0 adrp x16, #4096
-# AFTER: 140001090: 10 2a 40 f9 ldr x16, [x16, #80]
+# AFTER: 14000108c: 10 00 00 d0 adrp x16, #8192
+# AFTER: 140001090: 10 1e 40 f9 ldr x16, [x16, #56]
# AFTER: 140001094: 00 02 1f d6 br x16
--- !COFF
Modified: lld/trunk/test/COFF/delayimports-armnt.yaml
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/COFF/delayimports-armnt.yaml?rev=330228&r1=330227&r2=330228&view=diff
==============================================================================
--- lld/trunk/test/COFF/delayimports-armnt.yaml (original)
+++ lld/trunk/test/COFF/delayimports-armnt.yaml Tue Apr 17 15:16:39 2018
@@ -13,9 +13,9 @@
# IMPORT-NEXT: DelayImport {
# IMPORT-NEXT: Name: library.dll
# IMPORT-NEXT: Attributes: 0x1
-# IMPORT-NEXT: ModuleHandle: 0x3000
-# IMPORT-NEXT: ImportAddressTable: 0x3008
-# IMPORT-NEXT: ImportNameTable: 0x2040
+# IMPORT-NEXT: ModuleHandle: 0x2000
+# IMPORT-NEXT: ImportAddressTable: 0x2008
+# IMPORT-NEXT: ImportNameTable: 0x3040
# IMPORT-NEXT: BoundDelayImportTable: 0x0
# IMPORT-NEXT: UnloadDelayImportTable: 0x0
# IMPORT-NEXT: Import {
@@ -43,21 +43,21 @@
# BASEREL-NEXT: }
# BASEREL-NEXT: Entry {
# BASEREL-NEXT: Type: HIGHLOW
-# BASEREL-NEXT: Address: 0x3008
+# BASEREL-NEXT: Address: 0x2008
# BASEREL-NEXT: }
# BASEREL-NEXT: Entry {
# BASEREL-NEXT: Type: ABSOLUTE
-# BASEREL-NEXT: Address: 0x3000
+# BASEREL-NEXT: Address: 0x2000
# BASEREL-NEXT: }
# BASEREL-NEXT: ]
#
-# DISASM: 401018: 43 f2 08 0c movw r12, #12296
+# DISASM: 401018: 42 f2 08 0c movw r12, #8200
# DISASM-NEXT: 40101c: c0 f2 40 0c movt r12, #64
# DISASM-NEXT: 401020: 2d e9 0f 48 push.w {r0, r1, r2, r3, r11, lr}
# DISASM-NEXT: 401024: 0d f2 10 0b addw r11, sp, #16
# DISASM-NEXT: 401028: 2d ed 10 0b vpush {d0, d1, d2, d3, d4, d5, d6, d7}
# DISASM-NEXT: 40102c: 61 46 mov r1, r12
-# DISASM-NEXT: 40102e: 42 f2 00 00 movw r0, #8192
+# DISASM-NEXT: 40102e: 43 f2 00 00 movw r0, #12288
# DISASM-NEXT: 401032: c0 f2 40 00 movt r0, #64
# DISASM-NEXT: 401036: ff f7 e3 ff bl #-58
# DISASM-NEXT: 40103a: 84 46 mov r12, r0
Modified: lld/trunk/test/COFF/delayimports.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/COFF/delayimports.test?rev=330228&r1=330227&r2=330228&view=diff
==============================================================================
--- lld/trunk/test/COFF/delayimports.test (original)
+++ lld/trunk/test/COFF/delayimports.test Tue Apr 17 15:16:39 2018
@@ -7,9 +7,9 @@
IMPORT: DelayImport {
IMPORT-NEXT: Name: std64.dll
IMPORT-NEXT: Attributes: 0x1
-IMPORT-NEXT: ModuleHandle: 0x3018
-IMPORT-NEXT: ImportAddressTable: 0x3020
-IMPORT-NEXT: ImportNameTable: 0x2040
+IMPORT-NEXT: ModuleHandle: 0x2018
+IMPORT-NEXT: ImportAddressTable: 0x2020
+IMPORT-NEXT: ImportNameTable: 0x3040
IMPORT-NEXT: BoundDelayImportTable: 0x0
IMPORT-NEXT: UnloadDelayImportTable: 0x0
IMPORT-NEXT: Import {
@@ -29,13 +29,13 @@ IMPORT-NEXT: }
BASEREL: BaseReloc [
BASEREL-NEXT: Entry {
BASEREL-NEXT: Type: DIR64
-BASEREL-NEXT: Address: 0x3020
+BASEREL-NEXT: Address: 0x2020
BASEREL-NEXT: }
BASEREL-NEXT: Entry {
BASEREL-NEXT: Type: DIR64
-BASEREL-NEXT: Address: 0x3028
+BASEREL-NEXT: Address: 0x2028
BASEREL-NEXT: }
BASEREL-NEXT: Entry {
BASEREL-NEXT: Type: DIR64
-BASEREL-NEXT: Address: 0x3030
+BASEREL-NEXT: Address: 0x2030
BASEREL-NEXT: }
Modified: lld/trunk/test/COFF/delayimports32.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/COFF/delayimports32.test?rev=330228&r1=330227&r2=330228&view=diff
==============================================================================
--- lld/trunk/test/COFF/delayimports32.test (original)
+++ lld/trunk/test/COFF/delayimports32.test Tue Apr 17 15:16:39 2018
@@ -15,7 +15,7 @@ IMPORT-NEXT: Name: std32.dll
IMPORT-NEXT: Attributes: 0x1
IMPORT-NEXT: ModuleHandle: 0x3018
IMPORT-NEXT: ImportAddressTable: 0x3020
-IMPORT-NEXT: ImportNameTable: 0x20DC
+IMPORT-NEXT: ImportNameTable: 0x4040
IMPORT-NEXT: BoundDelayImportTable: 0x0
IMPORT-NEXT: UnloadDelayImportTable: 0x0
IMPORT-NEXT: Import {
@@ -72,7 +72,7 @@ BASEREL-NEXT: }
BASEREL-NEXT: ]
DISASM: 102b: 68 20 30 40 00 pushl $4206624
-DISASM-NEXT: 1030: 68 9c 20 40 00 pushl $4202652
+DISASM-NEXT: 1030: 68 00 40 40 00 pushl $4210688
DISASM-NEXT: 1035: e8 c6 ff ff ff calll -58 <.text>
DISASM-NEXT: 103a: 5a popl %edx
DISASM-NEXT: 103b: 59 popl %ecx
@@ -80,7 +80,7 @@ DISASM-NEXT: 103c: ff e0 jmpl
DISASM-NEXT: 103e: 51 pushl %ecx
DISASM-NEXT: 103f: 52 pushl %edx
DISASM-NEXT: 1040: 68 24 30 40 00 pushl $4206628
-DISASM-NEXT: 1045: 68 9c 20 40 00 pushl $4202652
+DISASM-NEXT: 1045: 68 00 40 40 00 pushl $4210688
DISASM-NEXT: 104a: e8 b1 ff ff ff calll -79 <.text>
DISASM-NEXT: 104f: 5a popl %edx
DISASM-NEXT: 1050: 59 popl %ecx
Modified: lld/trunk/test/COFF/export-armnt.yaml
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/COFF/export-armnt.yaml?rev=330228&r1=330227&r2=330228&view=diff
==============================================================================
--- lld/trunk/test/COFF/export-armnt.yaml (original)
+++ lld/trunk/test/COFF/export-armnt.yaml Tue Apr 17 15:16:39 2018
@@ -9,7 +9,7 @@
# CHECK: DLL name: export-armnt.yaml.tmp.dll
# CHECK: Ordinal RVA Name
# CHECK-NEXT: 0 0
-# CHECK-NEXT: 1 0x3000 exportdata
+# CHECK-NEXT: 1 0x2000 exportdata
# CHECK-NEXT: 2 0x1005 exportfn1
# CHECK-NEXT: 3 0x1009 exportfn2
# CHECK-NEXT: 4 0x1009 exportfn3
Modified: lld/trunk/test/COFF/hello32.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/COFF/hello32.test?rev=330228&r1=330227&r2=330228&view=diff
==============================================================================
--- lld/trunk/test/COFF/hello32.test (original)
+++ lld/trunk/test/COFF/hello32.test Tue Apr 17 15:16:39 2018
@@ -57,7 +57,7 @@ HEADER-NEXT: NumberOfRvaAndSize: 16
HEADER-NEXT: DataDirectory {
HEADER-NEXT: ExportTableRVA: 0x0
HEADER-NEXT: ExportTableSize: 0x0
-HEADER-NEXT: ImportTableRVA: 0x2000
+HEADER-NEXT: ImportTableRVA: 0x3000
HEADER-NEXT: ImportTableSize: 0x28
HEADER-NEXT: ResourceTableRVA: 0x0
HEADER-NEXT: ResourceTableSize: 0x0
@@ -79,7 +79,7 @@ HEADER-NEXT: LoadConfigTableRVA: 0x0
HEADER-NEXT: LoadConfigTableSize: 0x0
HEADER-NEXT: BoundImportRVA: 0x0
HEADER-NEXT: BoundImportSize: 0x0
-HEADER-NEXT: IATRVA: 0x2034
+HEADER-NEXT: IATRVA: 0x3034
HEADER-NEXT: IATSize: 0xC
HEADER-NEXT: DelayImportDescriptorRVA: 0x0
HEADER-NEXT: DelayImportDescriptorSize: 0x0
@@ -114,8 +114,8 @@ IMPORTS: Arch: i386
IMPORTS: AddressSize: 32bit
IMPORTS: Import {
IMPORTS: Name: std32.dll
-IMPORTS: ImportLookupTableRVA: 0x2028
-IMPORTS: ImportAddressTableRVA: 0x2034
+IMPORTS: ImportLookupTableRVA: 0x3028
+IMPORTS: ImportAddressTableRVA: 0x3034
IMPORTS: Symbol: ExitProcess (0)
IMPORTS: Symbol: MessageBoxA (1)
IMPORTS: }
Modified: lld/trunk/test/COFF/imports.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/COFF/imports.test?rev=330228&r1=330227&r2=330228&view=diff
==============================================================================
--- lld/trunk/test/COFF/imports.test (original)
+++ lld/trunk/test/COFF/imports.test Tue Apr 17 15:16:39 2018
@@ -15,21 +15,21 @@ TEXT: Disassembly of section .text:
TEXT-NEXT: .text:
TEXT-NEXT: subq $40, %rsp
TEXT-NEXT: movq $0, %rcx
-TEXT-NEXT: leaq 8180(%rip), %rdx
-TEXT-NEXT: leaq 8167(%rip), %r8
+TEXT-NEXT: leaq 4084(%rip), %rdx
+TEXT-NEXT: leaq 4071(%rip), %r8
TEXT-NEXT: movl $0, %r9d
TEXT-NEXT: callq 60
TEXT-NEXT: movl $0, %ecx
TEXT-NEXT: callq 18
TEXT-NEXT: callq 29
-TEXT: jmpq *4098(%rip)
-TEXT: jmpq *4090(%rip)
-TEXT: jmpq *4082(%rip)
+TEXT: jmpq *8194(%rip)
+TEXT: jmpq *8186(%rip)
+TEXT: jmpq *8178(%rip)
IMPORT: Import {
IMPORT-NEXT: Name: std64.dll
-IMPORT-NEXT: ImportLookupTableRVA: 0x2028
-IMPORT-NEXT: ImportAddressTableRVA: 0x2048
+IMPORT-NEXT: ImportLookupTableRVA: 0x3028
+IMPORT-NEXT: ImportAddressTableRVA: 0x3048
IMPORT-NEXT: Symbol: ExitProcess (0)
IMPORT-NEXT: Symbol: (50)
IMPORT-NEXT: Symbol: MessageBoxA (1)
Modified: lld/trunk/test/COFF/pdb-publics-import.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/COFF/pdb-publics-import.test?rev=330228&r1=330227&r2=330228&view=diff
==============================================================================
--- lld/trunk/test/COFF/pdb-publics-import.test (original)
+++ lld/trunk/test/COFF/pdb-publics-import.test Tue Apr 17 15:16:39 2018
@@ -19,9 +19,9 @@ CHECK-NEXT: flags = function,
CHECK-NEXT: 88 | S_PUB32 [size = 24] `exportfn2`
CHECK-NEXT: flags = function, addr = 0001:0032
CHECK-NEXT: 32 | S_PUB32 [size = 32] `__imp_exportfn2`
-CHECK-NEXT: flags = none, addr = 0002:0240
+CHECK-NEXT: flags = none, addr = 0003:0072
CHECK-NEXT: 0 | S_PUB32 [size = 32] `__imp_exportfn1`
-CHECK-NEXT: flags = none, addr = 0002:0232
+CHECK-NEXT: flags = none, addr = 0003:0064
CHECK: Section Contributions
CHECK-NEXT: ============================================================
Modified: lld/trunk/test/COFF/symtab.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/COFF/symtab.test?rev=330228&r1=330227&r2=330228&view=diff
==============================================================================
--- lld/trunk/test/COFF/symtab.test (original)
+++ lld/trunk/test/COFF/symtab.test Tue Apr 17 15:16:39 2018
@@ -56,7 +56,7 @@
# CHECK-NEXT: Symbol {
# CHECK-NEXT: Name: message
# CHECK-NEXT: Value: 6
-# CHECK-NEXT: Section: .text2
+# CHECK-NEXT: Section: .text2 (5)
# CHECK-NEXT: BaseType: Null (0x0)
# CHECK-NEXT: ComplexType: Null (0x0)
# CHECK-NEXT: StorageClass: Static (0x3)
@@ -74,7 +74,7 @@
# CHECK-NEXT: Symbol {
# CHECK-NEXT: Name: caption
# CHECK-NEXT: Value: 0
-# CHECK-NEXT: Section: .text2
+# CHECK-NEXT: Section: .text2 (5)
# CHECK-NEXT: BaseType: Null (0x0)
# CHECK-NEXT: ComplexType: Null (0x0)
# CHECK-NEXT: StorageClass: Static (0x3)
More information about the llvm-commits
mailing list