diff options
author | Alan Modra <amodra@gmail.com> | 2017-05-18 14:28:17 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2017-05-18 14:28:17 +0930 |
commit | 087ea22225435ab5800e6c29671acab40dc6ca82 (patch) | |
tree | 9b8ee7c7e8a54fff14e5d91b5b2863bdb4ce9bd9 /ld | |
parent | a406db9163e45ab55c3addff2ce1e61796f1bddc (diff) | |
download | gdb-087ea22225435ab5800e6c29671acab40dc6ca82.zip gdb-087ea22225435ab5800e6c29671acab40dc6ca82.tar.gz gdb-087ea22225435ab5800e6c29671acab40dc6ca82.tar.bz2 |
pr20882 testcase
-gdwarf-sections doesn't work on targets that lack support to emit
address size relative relocs. The testcase as it was avoided
-gdwarf-sections doing anything by providing a non-empty .debug_line.
It's better to not use -gdwarf-sections. Also, the testcase failed
to match the output for 16-bit address targets like avr.
PR ld/20882
* testsuite/ld-gc/pr20882.d: Don't pass -gdwarf-sections to gas.
Allow for 16-bit address targets and match expected data fully.
* testsuite/ld-gc/pr20882a.s: Delete .debug_line section.
* testsuite/ld-gc/pr20882b.s: Likewise.
* testsuite/ld-gc/pr20882c.s: Likewise.
Diffstat (limited to 'ld')
-rw-r--r-- | ld/ChangeLog | 9 | ||||
-rw-r--r-- | ld/testsuite/ld-gc/pr20882.d | 3 | ||||
-rw-r--r-- | ld/testsuite/ld-gc/pr20882a.s | 7 | ||||
-rw-r--r-- | ld/testsuite/ld-gc/pr20882b.s | 3 | ||||
-rw-r--r-- | ld/testsuite/ld-gc/pr20882c.s | 3 |
5 files changed, 12 insertions, 13 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index b71bc16..c5892d1 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,12 @@ +2017-05-18 Alan Modra <amodra@gmail.com> + + PR ld/20882 + * testsuite/ld-gc/pr20882.d: Don't pass -gdwarf-sections to gas. + Allow for 16-bit address targets and match expected data fully. + * testsuite/ld-gc/pr20882a.s: Delete .debug_line section. + * testsuite/ld-gc/pr20882b.s: Likewise. + * testsuite/ld-gc/pr20882c.s: Likewise. + 2017-05-17 H.J. Lu <hongjiu.lu@intel.com> PR ld/20882 diff --git a/ld/testsuite/ld-gc/pr20882.d b/ld/testsuite/ld-gc/pr20882.d index 55fa141..dd388c5 100644 --- a/ld/testsuite/ld-gc/pr20882.d +++ b/ld/testsuite/ld-gc/pr20882.d @@ -2,9 +2,8 @@ #source: pr20882a.s #source: pr20882b.s #source: pr20882c.s -#as: -gdwarf-sections #ld: --gc-sections -e main #readelf: -x .debug_info #... - +0x0+ [0-9a-f ]+ 28 +.+\( + 0x0+ (0a000000 00000000 |00000000 0000000a |06000000 |00000006 |0400|0004)28 .* diff --git a/ld/testsuite/ld-gc/pr20882a.s b/ld/testsuite/ld-gc/pr20882a.s index 3348ba9..aad12e8 100644 --- a/ld/testsuite/ld-gc/pr20882a.s +++ b/ld/testsuite/ld-gc/pr20882a.s @@ -1,11 +1,8 @@ .text - .globl main - .type main, %function + .globl main + .type main, %function main: .byte 0 .section .debug_info,"",%progbits .dc.a t.c.4903c230+2 - - .section .debug_line,"",%progbits - .byte 0 diff --git a/ld/testsuite/ld-gc/pr20882b.s b/ld/testsuite/ld-gc/pr20882b.s index fed521c..ea0cf2e 100644 --- a/ld/testsuite/ld-gc/pr20882b.s +++ b/ld/testsuite/ld-gc/pr20882b.s @@ -3,6 +3,3 @@ .globl t.c.4903c230 t.c.4903c230: .byte 0x28 - - .section .debug_line,"",%progbits - .byte 0 diff --git a/ld/testsuite/ld-gc/pr20882c.s b/ld/testsuite/ld-gc/pr20882c.s index a77edad..44d27349 100644 --- a/ld/testsuite/ld-gc/pr20882c.s +++ b/ld/testsuite/ld-gc/pr20882c.s @@ -3,6 +3,3 @@ .globl t.c.4903c231 t.c.4903c231: .byte 0x29 - - .section .debug_line,"",%progbits - .byte 0 |