diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2018-03-14 04:23:24 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2018-03-14 04:23:40 -0700 |
commit | 9e223787a474c672c5f1cfd4574857241ae4eafa (patch) | |
tree | df0b15bd36ada60535ed0795da1df927a8189221 /ld/testsuite/ld-gc | |
parent | bf48520113c4265017769d374f6b1a7ce3fc8e41 (diff) | |
download | gdb-9e223787a474c672c5f1cfd4574857241ae4eafa.zip gdb-9e223787a474c672c5f1cfd4574857241ae4eafa.tar.gz gdb-9e223787a474c672c5f1cfd4574857241ae4eafa.tar.bz2 |
GC: Also check the local debug definition section
Extend
commit b7c871edcd83ccdc5fcd8148a7f433efd6b52255
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Wed May 17 07:57:15 2017 -0700
Mark debug sections referenced by kept debug sections
to handle the local debug definition section.
bfd/
PR ld/20882
* elflink.c (elf_gc_mark_debug_section): Also check the local
debug definition section.
ld/
PR ld/20882
* testsuite/ld-gc/pr20882.d: Also dump and check .debug_abbrev
section.
* testsuite/ld-gc/pr20882b.s: Add .debug_abbrev section.
Diffstat (limited to 'ld/testsuite/ld-gc')
-rw-r--r-- | ld/testsuite/ld-gc/pr20882.d | 9 | ||||
-rw-r--r-- | ld/testsuite/ld-gc/pr20882b.s | 9 |
2 files changed, 14 insertions, 4 deletions
diff --git a/ld/testsuite/ld-gc/pr20882.d b/ld/testsuite/ld-gc/pr20882.d index dd388c5..1d68d05 100644 --- a/ld/testsuite/ld-gc/pr20882.d +++ b/ld/testsuite/ld-gc/pr20882.d @@ -3,7 +3,10 @@ #source: pr20882b.s #source: pr20882c.s #ld: --gc-sections -e main -#readelf: -x .debug_info +#readelf: -x .debug_info -x .debug_abbrev -#... - 0x0+ (0a000000 00000000 |00000000 0000000a |06000000 |00000006 |0400|0004)28 .* +Hex dump of section '\.debug_info': + 0x0+ .* + +Hex dump of section '\.debug_abbrev': + 0x0+ 61626364 +abcd diff --git a/ld/testsuite/ld-gc/pr20882b.s b/ld/testsuite/ld-gc/pr20882b.s index ea0cf2e..baabf55 100644 --- a/ld/testsuite/ld-gc/pr20882b.s +++ b/ld/testsuite/ld-gc/pr20882b.s @@ -2,4 +2,11 @@ .hidden t.c.4903c230 .globl t.c.4903c230 t.c.4903c230: - .byte 0x28 + .dc.a .Ldebug_abbrev0 + + .section .debug_abbrev,"",%progbits +.Ldebug_abbrev0: + .byte 0x61 + .byte 0x62 + .byte 0x63 + .byte 0x64 |