diff options
author | Nick Clifton <nickc@redhat.com> | 2017-10-23 18:16:49 +0100 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2017-10-23 18:16:49 +0100 |
commit | 66cae56016a12f7cbdc94be6f82c1cad1c59b521 (patch) | |
tree | a89554827cf870a421e3af26f6b7d6c389abefe4 /ld/testsuite/ld-mmix | |
parent | fe4e2a3c9281851c9da99a6e36a2bc96e4279476 (diff) | |
download | gdb-66cae56016a12f7cbdc94be6f82c1cad1c59b521.zip gdb-66cae56016a12f7cbdc94be6f82c1cad1c59b521.tar.gz gdb-66cae56016a12f7cbdc94be6f82c1cad1c59b521.tar.bz2 |
Make sure that undefined symbols added to the linker command line via the -u option appear in the output executable, if they have not been resolved.
PR 22319
bfd * elflink.c (elf_link_output_extsym): Keep global undefined
symbols if they have been marked as needed.
ld * testsuite/ld-elf/pr22310.s: New test source file.
* testsuite/ld-elf/pr22310.d: New test driver.
* testsuite/ld-mmix/undef-3.d: Update expected output from readelf.
Diffstat (limited to 'ld/testsuite/ld-mmix')
-rw-r--r-- | ld/testsuite/ld-mmix/undef-3.d | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/ld/testsuite/ld-mmix/undef-3.d b/ld/testsuite/ld-mmix/undef-3.d index 6afb52b..2484d76 100644 --- a/ld/testsuite/ld-mmix/undef-3.d +++ b/ld/testsuite/ld-mmix/undef-3.d @@ -12,20 +12,21 @@ Section Headers: +\[ 1\] \.text +PROGBITS +0+ +0+78 +0+4 +0+ +AX +0 +0 +4 +\[ 2\] \.symtab +SYMTAB +0+ .* - +0+a8 +0+18 +3 +2 +8 + +0+c0 +0+18 +3 +2 +8 +\[ 3\] \.strtab +STRTAB +0+ .* - +0+21 +0+ +0 +0 +1 + +0+28 +0+ +0 +0 +1 +\[ 4\] \.shstrtab +STRTAB +0+ +[0-9a-f]+ +0+21 +0+ +0 +0 +1 Key to Flags: #... -Symbol table '\.symtab' contains 7 entries: +Symbol table '\.symtab' contains 8 entries: +Num: +Value +Size +Type +Bind +Vis +Ndx +Name +0: 0+ +0 +NOTYPE +LOCAL +DEFAULT +UND +1: 0+ +0 +SECTION +LOCAL +DEFAULT +1 - +2: 0+ +0 +NOTYPE +GLOBAL +DEFAULT +1 _start - +3: 2000000000000000 +0 +NOTYPE +GLOBAL +DEFAULT +1 __bss_start - +4: 2000000000000000 +0 +NOTYPE +GLOBAL +DEFAULT +1 _edata - +5: 2000000000000000 +0 +NOTYPE +GLOBAL +DEFAULT +1 _end - +6: 0+ +0 +NOTYPE +GLOBAL +DEFAULT +1 _start\. +[ ]+2: 0+[ ]+0[ ]+NOTYPE[ ]+GLOBAL[ ]+DEFAULT[ ]+UND[ ]+undefd + +3: 0+ +0 +NOTYPE +GLOBAL +DEFAULT +1 _start + +4: 2000000000000000 +0 +NOTYPE +GLOBAL +DEFAULT +1 __bss_start + +5: 2000000000000000 +0 +NOTYPE +GLOBAL +DEFAULT +1 _edata + +6: 2000000000000000 +0 +NOTYPE +GLOBAL +DEFAULT +1 _end + +7: 0+ +0 +NOTYPE +GLOBAL +DEFAULT +1 _start\. |