diff options
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 5 | ||||
-rw-r--r-- | gas/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gas/testsuite/gas/sparc/pcrel.d | 25 | ||||
-rw-r--r-- | gas/testsuite/gas/sparc/pcrel64.d | 29 | ||||
-rw-r--r-- | gas/write.c | 4 |
5 files changed, 39 insertions, 29 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index a769877edab..d5cc47f44ad 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -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> * config/tc-aarch64.c (reloc_table_entry): Generate diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 630fa91e6cd..f19792ba12d 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -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> * gas/aarch64/diagnostic.s: Add LDR test. diff --git a/gas/testsuite/gas/sparc/pcrel.d b/gas/testsuite/gas/sparc/pcrel.d index 6abe49b3cfc..7a8aec2095f 100644 --- a/gas/testsuite/gas/sparc/pcrel.d +++ b/gas/testsuite/gas/sparc/pcrel.d @@ -4,7 +4,7 @@ .*: +file format .*sparc.* -Disassembly of section .text: +Disassembly of section \.text: 0+ <foo-0x8>: 0: 01 00 00 00 nop @@ -12,23 +12,22 @@ Disassembly of section .text: 0+8 <foo>: 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 4: 00 00 00 01 (unimp|illtrap) 0x1 - ... - 8: R_SPARC_32 .text\+0x10 - c: R_SPARC_DISP32 .text\+0x10 - 10: R_SPARC_32 .text\+0x14 - 14: R_SPARC_DISP32 .text\+0x14 + \.\.\. + 8: R_SPARC_32 \.text\+0x10 + c: R_SPARC_DISP32 \.text\+0x10 + 10: R_SPARC_32 \.text\+0x14 + 14: R_SPARC_DISP32 \.text\+0x14 18: R_SPARC_32 foo 1c: R_SPARC_DISP32 foo 20: R_SPARC_32 foo\+0x10 24: R_SPARC_DISP32 foo\+0x10 - 28: R_SPARC_DISP8 .data\+0x18 - 29: R_SPARC_DISP8 .data\+0x34 - 2a: R_SPARC_DISP16 .data\+0x18 - 2c: R_SPARC_DISP16 .data\+0x34 + 28: R_SPARC_DISP8 \.data\+0x18 + 29: R_SPARC_DISP8 \.data\+0x34 + 2a: R_SPARC_DISP16 \.data\+0x18 + 2c: R_SPARC_DISP16 \.data\+0x34 30: 00 02 00 00 (unimp|illtrap) 0x20000 - ... diff --git a/gas/testsuite/gas/sparc/pcrel64.d b/gas/testsuite/gas/sparc/pcrel64.d index d778850e2b8..9c50d349beb 100644 --- a/gas/testsuite/gas/sparc/pcrel64.d +++ b/gas/testsuite/gas/sparc/pcrel64.d @@ -4,7 +4,7 @@ .*: +file format .*sparc.* -Disassembly of section .text: +Disassembly of section \.text: 0+ <foo-0x8>: 0: 01 00 00 00 nop @@ -12,29 +12,28 @@ Disassembly of section .text: 0+8 <foo>: 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 4: 00 00 00 01 illtrap 0x1 - ... - 8: R_SPARC_32 .text\+0x10 - c: R_SPARC_DISP32 .text\+0x10 - 10: R_SPARC_32 .text\+0x14 - 14: R_SPARC_DISP32 .text\+0x14 + \.\.\. + 8: R_SPARC_32 \.text\+0x10 + c: R_SPARC_DISP32 \.text\+0x10 + 10: R_SPARC_32 \.text\+0x14 + 14: R_SPARC_DISP32 \.text\+0x14 18: R_SPARC_32 foo 1c: R_SPARC_DISP32 foo 20: R_SPARC_32 foo\+0x10 24: R_SPARC_DISP32 foo\+0x10 - 28: R_SPARC_64 .text\+0x8 - 30: R_SPARC_DISP64 .text\+0x8 + 28: R_SPARC_64 \.text\+0x8 + 30: R_SPARC_DISP64 \.text\+0x8 38: R_SPARC_64 foo 40: R_SPARC_DISP64 foo 48: R_SPARC_64 foo\+0x10 50: R_SPARC_DISP64 foo\+0x10 - 58: R_SPARC_DISP8 .data\+0x18 - 59: R_SPARC_DISP8 .data\+0x64 - 5a: R_SPARC_DISP16 .data\+0x18 - 5c: R_SPARC_DISP16 .data\+0x64 + 58: R_SPARC_DISP8 \.data\+0x18 + 59: R_SPARC_DISP8 \.data\+0x64 + 5a: R_SPARC_DISP16 \.data\+0x18 + 5c: R_SPARC_DISP16 \.data\+0x64 60: 00 02 00 00 illtrap 0x20000 - ... diff --git a/gas/write.c b/gas/write.c index aefed29ba33..949ae921dfe 100644 --- a/gas/write.c +++ b/gas/write.c @@ -1692,7 +1692,9 @@ set_symtab (void) of the section. This allows proper nop-filling at the end of code-bearing sections. */ #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 #define SUB_SEGMENT_ALIGN(SEG, FRCHAIN) 0 #endif |