mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-29 08:24:05 +08:00
Pad only text sections at end by default
gas/ * write.c (SUB_SEGMENT_ALIGN): Don't pad non-code sections at end to their alignment. gas/testsuite/ * gas/sparc/pcrel.d: Update for changed padding in data sections. * gas/sparc/pcrel64.d: Likewise. ld/testsuite/ * ld-sparc/gotop32.rd: Update for changed padding in data sections. * ld-sparc/gotop32.td: Likewise. * ld-sparc/gotop64.rd: Likewise. * ld-sparc/gotop64.td: Likewise. * ld-tilegx/external.s: Align .data. * ld-tilepro/external.s: Likewise.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2015-02-28 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
|
* write.c (SUB_SEGMENT_ALIGN): Don't pad non-code sections at
|
||||||
|
end to their alignment.
|
||||||
|
|
||||||
2015-02-19 Marcus Shawcroft <marcus.shawcroft@arm.com>
|
2015-02-19 Marcus Shawcroft <marcus.shawcroft@arm.com>
|
||||||
|
|
||||||
* config/tc-aarch64.c (reloc_table_entry): Generate
|
* config/tc-aarch64.c (reloc_table_entry): Generate
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
2015-02-28 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
|
* gas/sparc/pcrel.d: Update for changed padding in data sections.
|
||||||
|
* gas/sparc/pcrel64.d: Likewise.
|
||||||
|
|
||||||
2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
|
2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
|
||||||
|
|
||||||
* gas/aarch64/diagnostic.s: Add LDR test.
|
* gas/aarch64/diagnostic.s: Add LDR test.
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
.*: +file format .*sparc.*
|
.*: +file format .*sparc.*
|
||||||
|
|
||||||
Disassembly of section .text:
|
Disassembly of section \.text:
|
||||||
|
|
||||||
0+ <foo-0x8>:
|
0+ <foo-0x8>:
|
||||||
0: 01 00 00 00 nop
|
0: 01 00 00 00 nop
|
||||||
@ -12,23 +12,22 @@ Disassembly of section .text:
|
|||||||
|
|
||||||
0+8 <foo>:
|
0+8 <foo>:
|
||||||
8: 01 00 00 00 nop
|
8: 01 00 00 00 nop
|
||||||
Disassembly of section .data:
|
Disassembly of section \.data:
|
||||||
|
|
||||||
0+ <.data>:
|
0+ <\.data>:
|
||||||
0: 00 00 00 00 (unimp|illtrap) 0
|
0: 00 00 00 00 (unimp|illtrap) 0
|
||||||
4: 00 00 00 01 (unimp|illtrap) 0x1
|
4: 00 00 00 01 (unimp|illtrap) 0x1
|
||||||
...
|
\.\.\.
|
||||||
8: R_SPARC_32 .text\+0x10
|
8: R_SPARC_32 \.text\+0x10
|
||||||
c: R_SPARC_DISP32 .text\+0x10
|
c: R_SPARC_DISP32 \.text\+0x10
|
||||||
10: R_SPARC_32 .text\+0x14
|
10: R_SPARC_32 \.text\+0x14
|
||||||
14: R_SPARC_DISP32 .text\+0x14
|
14: R_SPARC_DISP32 \.text\+0x14
|
||||||
18: R_SPARC_32 foo
|
18: R_SPARC_32 foo
|
||||||
1c: R_SPARC_DISP32 foo
|
1c: R_SPARC_DISP32 foo
|
||||||
20: R_SPARC_32 foo\+0x10
|
20: R_SPARC_32 foo\+0x10
|
||||||
24: R_SPARC_DISP32 foo\+0x10
|
24: R_SPARC_DISP32 foo\+0x10
|
||||||
28: R_SPARC_DISP8 .data\+0x18
|
28: R_SPARC_DISP8 \.data\+0x18
|
||||||
29: R_SPARC_DISP8 .data\+0x34
|
29: R_SPARC_DISP8 \.data\+0x34
|
||||||
2a: R_SPARC_DISP16 .data\+0x18
|
2a: R_SPARC_DISP16 \.data\+0x18
|
||||||
2c: R_SPARC_DISP16 .data\+0x34
|
2c: R_SPARC_DISP16 \.data\+0x34
|
||||||
30: 00 02 00 00 (unimp|illtrap) 0x20000
|
30: 00 02 00 00 (unimp|illtrap) 0x20000
|
||||||
...
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
.*: +file format .*sparc.*
|
.*: +file format .*sparc.*
|
||||||
|
|
||||||
Disassembly of section .text:
|
Disassembly of section \.text:
|
||||||
|
|
||||||
0+ <foo-0x8>:
|
0+ <foo-0x8>:
|
||||||
0: 01 00 00 00 nop
|
0: 01 00 00 00 nop
|
||||||
@ -12,29 +12,28 @@ Disassembly of section .text:
|
|||||||
|
|
||||||
0+8 <foo>:
|
0+8 <foo>:
|
||||||
8: 01 00 00 00 nop
|
8: 01 00 00 00 nop
|
||||||
Disassembly of section .data:
|
Disassembly of section \.data:
|
||||||
|
|
||||||
0+ <.data>:
|
0+ <\.data>:
|
||||||
0: 00 00 00 00 illtrap 0
|
0: 00 00 00 00 illtrap 0
|
||||||
4: 00 00 00 01 illtrap 0x1
|
4: 00 00 00 01 illtrap 0x1
|
||||||
...
|
\.\.\.
|
||||||
8: R_SPARC_32 .text\+0x10
|
8: R_SPARC_32 \.text\+0x10
|
||||||
c: R_SPARC_DISP32 .text\+0x10
|
c: R_SPARC_DISP32 \.text\+0x10
|
||||||
10: R_SPARC_32 .text\+0x14
|
10: R_SPARC_32 \.text\+0x14
|
||||||
14: R_SPARC_DISP32 .text\+0x14
|
14: R_SPARC_DISP32 \.text\+0x14
|
||||||
18: R_SPARC_32 foo
|
18: R_SPARC_32 foo
|
||||||
1c: R_SPARC_DISP32 foo
|
1c: R_SPARC_DISP32 foo
|
||||||
20: R_SPARC_32 foo\+0x10
|
20: R_SPARC_32 foo\+0x10
|
||||||
24: R_SPARC_DISP32 foo\+0x10
|
24: R_SPARC_DISP32 foo\+0x10
|
||||||
28: R_SPARC_64 .text\+0x8
|
28: R_SPARC_64 \.text\+0x8
|
||||||
30: R_SPARC_DISP64 .text\+0x8
|
30: R_SPARC_DISP64 \.text\+0x8
|
||||||
38: R_SPARC_64 foo
|
38: R_SPARC_64 foo
|
||||||
40: R_SPARC_DISP64 foo
|
40: R_SPARC_DISP64 foo
|
||||||
48: R_SPARC_64 foo\+0x10
|
48: R_SPARC_64 foo\+0x10
|
||||||
50: R_SPARC_DISP64 foo\+0x10
|
50: R_SPARC_DISP64 foo\+0x10
|
||||||
58: R_SPARC_DISP8 .data\+0x18
|
58: R_SPARC_DISP8 \.data\+0x18
|
||||||
59: R_SPARC_DISP8 .data\+0x64
|
59: R_SPARC_DISP8 \.data\+0x64
|
||||||
5a: R_SPARC_DISP16 .data\+0x18
|
5a: R_SPARC_DISP16 \.data\+0x18
|
||||||
5c: R_SPARC_DISP16 .data\+0x64
|
5c: R_SPARC_DISP16 \.data\+0x64
|
||||||
60: 00 02 00 00 illtrap 0x20000
|
60: 00 02 00 00 illtrap 0x20000
|
||||||
...
|
|
||||||
|
@ -1692,7 +1692,9 @@ set_symtab (void)
|
|||||||
of the section. This allows proper nop-filling at the end of
|
of the section. This allows proper nop-filling at the end of
|
||||||
code-bearing sections. */
|
code-bearing sections. */
|
||||||
#define SUB_SEGMENT_ALIGN(SEG, FRCHAIN) \
|
#define SUB_SEGMENT_ALIGN(SEG, FRCHAIN) \
|
||||||
(!(FRCHAIN)->frch_next ? get_recorded_alignment (SEG) : 0)
|
(!(FRCHAIN)->frch_next && subseg_text_p (SEG) \
|
||||||
|
? get_recorded_alignment (SEG) \
|
||||||
|
: 0)
|
||||||
#else
|
#else
|
||||||
#define SUB_SEGMENT_ALIGN(SEG, FRCHAIN) 0
|
#define SUB_SEGMENT_ALIGN(SEG, FRCHAIN) 0
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,3 +1,12 @@
|
|||||||
|
2015-02-28 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
|
* ld-sparc/gotop32.rd: Update for changed padding in data sections.
|
||||||
|
* ld-sparc/gotop32.td: Likewise.
|
||||||
|
* ld-sparc/gotop64.rd: Likewise.
|
||||||
|
* ld-sparc/gotop64.td: Likewise.
|
||||||
|
* ld-tilegx/external.s: Align .data.
|
||||||
|
* ld-tilepro/external.s: Likewise.
|
||||||
|
|
||||||
2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
|
2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
|
||||||
|
|
||||||
* ld-aarch64/aarch64-elf.exp (tls-tiny-desc, tls-tiny-desc-ie)
|
* ld-aarch64/aarch64-elf.exp (tls-tiny-desc, tls-tiny-desc-ie)
|
||||||
|
@ -16,7 +16,7 @@ Section Headers:
|
|||||||
+\[[ 0-9]+\] .text +PROGBITS +0+1000 0+1000 0+1000 0+ +AX +0 +0 4096
|
+\[[ 0-9]+\] .text +PROGBITS +0+1000 0+1000 0+1000 0+ +AX +0 +0 4096
|
||||||
+\[[ 0-9]+\] .dynamic +DYNAMIC +0+12000 0+2000 0+70 08 +WA +3 +0 +4
|
+\[[ 0-9]+\] .dynamic +DYNAMIC +0+12000 0+2000 0+70 08 +WA +3 +0 +4
|
||||||
+\[[ 0-9]+\] .got +PROGBITS +0+12070 0+2070 0+8 04 +WA +0 +0 +4
|
+\[[ 0-9]+\] .got +PROGBITS +0+12070 0+2070 0+8 04 +WA +0 +0 +4
|
||||||
+\[[ 0-9]+\] .data +PROGBITS +0+13000 0+3000 0+1000 00 +WA +0 +0 4096
|
+\[[ 0-9]+\] .data +PROGBITS +0+13000 0+3000 0+8 00 +WA +0 +0 4096
|
||||||
+\[[ 0-9]+\] .shstrtab +.*
|
+\[[ 0-9]+\] .shstrtab +.*
|
||||||
+\[[ 0-9]+\] .symtab +.*
|
+\[[ 0-9]+\] .symtab +.*
|
||||||
+\[[ 0-9]+\] .strtab +.*
|
+\[[ 0-9]+\] .strtab +.*
|
||||||
@ -29,7 +29,7 @@ There are [0-9]+ program headers, starting at offset [0-9]+
|
|||||||
Program Headers:
|
Program Headers:
|
||||||
+Type +Offset +VirtAddr +PhysAddr +FileSiz MemSiz +Flg Align
|
+Type +Offset +VirtAddr +PhysAddr +FileSiz MemSiz +Flg Align
|
||||||
+LOAD +0x0+ 0x0+ 0x0+ 0x0+2000 0x0+2000 R E 0x10000
|
+LOAD +0x0+ 0x0+ 0x0+ 0x0+2000 0x0+2000 R E 0x10000
|
||||||
+LOAD +0x0+2000 0x0+12000 0x0+12000 0x0+2000 0x0+2000 RW +0x10000
|
+LOAD +0x0+2000 0x0+12000 0x0+12000 0x0+1008 0x0+1008 RW +0x10000
|
||||||
+DYNAMIC +0x0+2000 0x0+12000 0x0+12000 0x0+70 0x0+70 RW +0x4
|
+DYNAMIC +0x0+2000 0x0+12000 0x0+12000 0x0+70 0x0+70 RW +0x4
|
||||||
#...
|
#...
|
||||||
|
|
||||||
|
@ -7,6 +7,5 @@
|
|||||||
.*: +file format elf32-sparc
|
.*: +file format elf32-sparc
|
||||||
|
|
||||||
Contents of section .data:
|
Contents of section .data:
|
||||||
13000 12345678 deadbeef 00000000 00000000 .*
|
13000 12345678 deadbeef .*
|
||||||
13010 00000000 00000000 00000000 00000000 .*
|
|
||||||
#pass
|
#pass
|
||||||
|
@ -16,7 +16,7 @@ Section Headers:
|
|||||||
+\[[ 0-9]+\] .text +PROGBITS +0+1000 0+1000 0+1000 0+ +AX +0 +0 4096
|
+\[[ 0-9]+\] .text +PROGBITS +0+1000 0+1000 0+1000 0+ +AX +0 +0 4096
|
||||||
+\[[ 0-9]+\] .dynamic +DYNAMIC +0+102000 0+2000 0+e0 10 +WA +3 +0 +8
|
+\[[ 0-9]+\] .dynamic +DYNAMIC +0+102000 0+2000 0+e0 10 +WA +3 +0 +8
|
||||||
+\[[ 0-9]+\] .got +PROGBITS +0+1020e0 0+20e0 0+10 08 +WA +0 +0 +8
|
+\[[ 0-9]+\] .got +PROGBITS +0+1020e0 0+20e0 0+10 08 +WA +0 +0 +8
|
||||||
+\[[ 0-9]+\] .data +PROGBITS +0+103000 0+3000 0+1000 00 +WA +0 +0 4096
|
+\[[ 0-9]+\] .data +PROGBITS +0+103000 0+3000 0+8 00 +WA +0 +0 4096
|
||||||
+\[[ 0-9]+\] .shstrtab +.*
|
+\[[ 0-9]+\] .shstrtab +.*
|
||||||
+\[[ 0-9]+\] .symtab +.*
|
+\[[ 0-9]+\] .symtab +.*
|
||||||
+\[[ 0-9]+\] .strtab +.*
|
+\[[ 0-9]+\] .strtab +.*
|
||||||
@ -29,7 +29,7 @@ There are [0-9]+ program headers, starting at offset [0-9]+
|
|||||||
Program Headers:
|
Program Headers:
|
||||||
+Type +Offset +VirtAddr +PhysAddr +FileSiz +MemSiz +Flg Align
|
+Type +Offset +VirtAddr +PhysAddr +FileSiz +MemSiz +Flg Align
|
||||||
+LOAD +0x0+ 0x0+ 0x0+ 0x0+2000 0x0+2000 R E 0x100000
|
+LOAD +0x0+ 0x0+ 0x0+ 0x0+2000 0x0+2000 R E 0x100000
|
||||||
+LOAD +0x0+2000 0x0+102000 0x0+102000 0x0+2000 0x0+2000 RW +0x100000
|
+LOAD +0x0+2000 0x0+102000 0x0+102000 0x0+1008 0x0+1008 RW +0x100000
|
||||||
+DYNAMIC +0x0+2000 0x0+102000 0x0+102000 0x0+e0 0x0+e0 RW +0x8
|
+DYNAMIC +0x0+2000 0x0+102000 0x0+102000 0x0+e0 0x0+e0 RW +0x8
|
||||||
#...
|
#...
|
||||||
|
|
||||||
|
@ -7,6 +7,5 @@
|
|||||||
.*: +file format elf64-sparc
|
.*: +file format elf64-sparc
|
||||||
|
|
||||||
Contents of section .data:
|
Contents of section .data:
|
||||||
103000 12345678 deadbeef 00000000 00000000 .*
|
103000 12345678 deadbeef .*
|
||||||
103010 00000000 00000000 00000000 00000000 .*
|
|
||||||
#pass
|
#pass
|
||||||
|
@ -38,6 +38,6 @@ external_64a = 0x123456789abcdef0
|
|||||||
external_64b = 0xfedcba9876543210
|
external_64b = 0xfedcba9876543210
|
||||||
|
|
||||||
.data
|
.data
|
||||||
|
.align 0x20
|
||||||
.global external_data1
|
.global external_data1
|
||||||
external_data1:
|
external_data1:
|
||||||
|
@ -28,6 +28,6 @@ external_32a = 0x87654321
|
|||||||
external_32b = 0xfedcba98
|
external_32b = 0xfedcba98
|
||||||
|
|
||||||
.data
|
.data
|
||||||
|
.align 0x20
|
||||||
.global external_data1
|
.global external_data1
|
||||||
external_data1:
|
external_data1:
|
||||||
|
Reference in New Issue
Block a user