diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2020-04-14 05:00:22 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2020-04-14 05:00:34 -0700 |
commit | 10ca4b042d15cd0727300cf3f5a9f11ac8d6abff (patch) | |
tree | e77a3dcf4134f8bc808afffc0e8afcdaa0d8d510 /ld | |
parent | 21b0982c778bf20de6fc42e7ae7735055cdd35c5 (diff) | |
download | gdb-10ca4b042d15cd0727300cf3f5a9f11ac8d6abff.zip gdb-10ca4b042d15cd0727300cf3f5a9f11ac8d6abff.tar.gz gdb-10ca4b042d15cd0727300cf3f5a9f11ac8d6abff.tar.bz2 |
readelf: Consolidate --syms --use-dynamic with --dyn-syms
When reconstructing dynamic symbol table from the PT_DYNAMIC segment,
compute dynamic symbol table size from hash table. For DT_HASH, the
number of dynamic symbol table entries equals the number of chains.
For DT_GNU_HASH/DT_MIPS_XHASH, only defined symbols with non-STB_LOCAL
indings are in hash table. Since DT_GNU_HASH/DT_MIPS_XHASH place all
symbols with STB_LOCAL binding before symbols with other bindings and
all undefined symbols defined ones in dynamic symbol table, the highest
symbol index in DT_GNU_HASH/DT_MIPS_XHASH is the highest dynamic symbol
table index.
Rewrite print_dynamic_symbol to dump dynamic symbol table for --dyn-syms
and --syms --use-dynamic.
binutils/
PR binutils/25707
* readelf.c (nbuckets): New.
(nchains): Likewise.
(buckets): Likewise.
(chains): Likewise.
(ngnubuckets): Likewise.
(gnubuckets): Likewise.
(gnuchains): Likewise.
(mipsxlat): Likewise.
(ngnuchains): Likewise.
(gnusymidx): Likewise.
(VALID_SYMBOL_NAME): Likewise.
(VALID_DYNAMIC_NAME): Use it.
(get_dynamic_data): Moved before process_dynamic_section.
(get_num_dynamic_syms): New function.
(process_dynamic_section): Use DT_SYMTAB, DT_SYMENT, DT_HASH,
DT_GNU_HASH and DT_MIPS_XHASH to reconstruct dynamic symbol
table. Use DT_STRTAB and DT_STRSZ to reconstruct dynamic string
table.
(get_symbol_index_type): Don't print "bad section index" when
there is no section header.
(print_dynamic_symbol): Rewrite.
(process_symbol_table): Call print_dynamic_symbol to dump dynamic
symbol table.
ld/
PR binutils/25707
* testsuite/ld-arm/armthumb-lib.sym: Updated.
* testsuite/ld-arm/farcall-mixed-app.sym: Likewise.
* testsuite/ld-arm/farcall-mixed-app2.sym: Likewise.
* testsuite/ld-arm/fdpic-main-m.sym: Likewise.
* testsuite/ld-arm/fdpic-main.sym: Likewise.
* testsuite/ld-arm/fdpic-shared-m.sym: Likewise.
* testsuite/ld-arm/fdpic-shared.sym: Likewise.
* testsuite/ld-arm/mixed-app.sym: Likewise.
* testsuite/ld-arm/mixed-lib.sym: Likewise.
* testsuite/ld-arm/preempt-app.sym: Likewise.
* testsuite/ld-elf/hash.d: Likewise.
* testsuite/ld-elf/pr13195.d: Likewise.
* testsuite/ld-elfvsb/hidden2.d: Likewise.
* testsuite/ld-mips-elf/hash2.d: Likewise.
Diffstat (limited to 'ld')
-rw-r--r-- | ld/ChangeLog | 18 | ||||
-rw-r--r-- | ld/testsuite/ld-arm/armthumb-lib.sym | 29 | ||||
-rw-r--r-- | ld/testsuite/ld-arm/farcall-mixed-app.sym | 29 | ||||
-rw-r--r-- | ld/testsuite/ld-arm/farcall-mixed-app2.sym | 29 | ||||
-rw-r--r-- | ld/testsuite/ld-arm/fdpic-main-m.sym | 27 | ||||
-rw-r--r-- | ld/testsuite/ld-arm/fdpic-main.sym | 27 | ||||
-rw-r--r-- | ld/testsuite/ld-arm/fdpic-shared-m.sym | 29 | ||||
-rw-r--r-- | ld/testsuite/ld-arm/fdpic-shared.sym | 29 | ||||
-rw-r--r-- | ld/testsuite/ld-arm/mixed-app.sym | 29 | ||||
-rw-r--r-- | ld/testsuite/ld-arm/mixed-lib.sym | 29 | ||||
-rw-r--r-- | ld/testsuite/ld-arm/preempt-app.sym | 27 | ||||
-rw-r--r-- | ld/testsuite/ld-elf/hash.d | 8 | ||||
-rw-r--r-- | ld/testsuite/ld-elf/pr13195.d | 2 | ||||
-rw-r--r-- | ld/testsuite/ld-elfvsb/hidden2.d | 4 | ||||
-rw-r--r-- | ld/testsuite/ld-mips-elf/hash2.d | 8 |
15 files changed, 176 insertions, 148 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index 06e7f5d..62c0e0d 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,21 @@ +2020-04-14 H.J. Lu <hongjiu.lu@intel.com> + + PR binutils/25707 + * testsuite/ld-arm/armthumb-lib.sym: Updated. + * testsuite/ld-arm/farcall-mixed-app.sym: Likewise. + * testsuite/ld-arm/farcall-mixed-app2.sym: Likewise. + * testsuite/ld-arm/fdpic-main-m.sym: Likewise. + * testsuite/ld-arm/fdpic-main.sym: Likewise. + * testsuite/ld-arm/fdpic-shared-m.sym: Likewise. + * testsuite/ld-arm/fdpic-shared.sym: Likewise. + * testsuite/ld-arm/mixed-app.sym: Likewise. + * testsuite/ld-arm/mixed-lib.sym: Likewise. + * testsuite/ld-arm/preempt-app.sym: Likewise. + * testsuite/ld-elf/hash.d: Likewise. + * testsuite/ld-elf/pr13195.d: Likewise. + * testsuite/ld-elfvsb/hidden2.d: Likewise. + * testsuite/ld-mips-elf/hash2.d: Likewise. + 2020-04-10 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> * testsuite/ld-shared/shared.exp: Remove dangling comments. diff --git a/ld/testsuite/ld-arm/armthumb-lib.sym b/ld/testsuite/ld-arm/armthumb-lib.sym index 3714e80..7119e35 100644 --- a/ld/testsuite/ld-arm/armthumb-lib.sym +++ b/ld/testsuite/ld-arm/armthumb-lib.sym @@ -1,15 +1,16 @@ -Symbol table for image: - +Num +Buc: +Value +Size +Type +Bind +Vis +Ndx +Name - +.. +..: ........ +0 +NOTYPE +GLOBAL +DEFAULT +9 _edata - +.. +..: ........ +0 +NOTYPE +GLOBAL +DEFAULT +9 __bss_start__ - +.. +..: ........ +0 +NOTYPE +GLOBAL +DEFAULT +9 _end - +.. +..: ........ +4 +OBJECT +GLOBAL +DEFAULT +9 data_obj - +.. +..: ........ +0 +NOTYPE +GLOBAL +DEFAULT +9 __bss_end__ - +.. +..: .......0 +20 +FUNC +GLOBAL +DEFAULT +6 lib_func1 - +.. +..: ........ +0 +NOTYPE +GLOBAL +DEFAULT +9 __data_start - +.. +..: ........ +0 +NOTYPE +GLOBAL +DEFAULT +9 __end__ - +.. +..: ........ +0 +NOTYPE +GLOBAL +DEFAULT +9 __bss_start - +.. +..: 00000000 +0 +NOTYPE +GLOBAL +DEFAULT +UND app_func2 - +.. +..: .......[048c] +2 +FUNC +GLOBAL +DEFAULT +6 lib_func2 - +.. +..: ........ +0 +NOTYPE +GLOBAL +DEFAULT +9 _bss_end__ +Symbol table for image contains 13 entries: + +Num: +Value +Size +Type +Bind +Vis +Ndx +Name + +..: +00000000 +0 +NOTYPE +LOCAL +DEFAULT +UND + +..: +........ +0 +NOTYPE +GLOBAL +DEFAULT +9 _bss_end__ + +..: +........ +0 +NOTYPE +GLOBAL +DEFAULT +9 __bss_start__ + +..: +.......[048c] +2 +FUNC +GLOBAL +DEFAULT +6 lib_func2 + +..: +.......0 +20 +FUNC +GLOBAL +DEFAULT +6 lib_func1 + +..: +00000000 +0 +NOTYPE +GLOBAL +DEFAULT +UND app_func2 + +..: +........ +0 +NOTYPE +GLOBAL +DEFAULT +9 __bss_end__ + +..: +........ +0 +NOTYPE +GLOBAL +DEFAULT +9 __bss_start + +..: +........ +0 +NOTYPE +GLOBAL +DEFAULT +9 __end__ + +..: +........ +4 +OBJECT +GLOBAL +DEFAULT +9 data_obj + +..: +........ +0 +NOTYPE +GLOBAL +DEFAULT +9 _edata + +..: +........ +0 +NOTYPE +GLOBAL +DEFAULT +9 _end + +..: +........ +0 +NOTYPE +GLOBAL +DEFAULT +9 __data_start diff --git a/ld/testsuite/ld-arm/farcall-mixed-app.sym b/ld/testsuite/ld-arm/farcall-mixed-app.sym index 093397c..febf1fe 100644 --- a/ld/testsuite/ld-arm/farcall-mixed-app.sym +++ b/ld/testsuite/ld-arm/farcall-mixed-app.sym @@ -1,15 +1,16 @@ -Symbol table for image: - +Num +Buc: +Value +Size +Type +Bind +Vis +Ndx +Name - +.. +..: ........ +0 +NOTYPE +GLOBAL +DEFAULT +11 _edata - +.. +..: ........ +0 +NOTYPE +GLOBAL +DEFAULT +12 __bss_start__ - +.. +..: ........ +0 +NOTYPE +GLOBAL +DEFAULT +12 _end - +.. +..: ........ +4 +OBJECT +GLOBAL +DEFAULT +12 data_obj - +.. +..: ........ +0 +NOTYPE +GLOBAL +DEFAULT +12 __bss_end__ - +.. +..: 0*[^0]*.* +0 +FUNC +GLOBAL +DEFAULT +UND lib_func1 - +.. +..: ........ +0 +NOTYPE +GLOBAL +DEFAULT +11 __data_start - +.. +..: ........ +0 +NOTYPE +GLOBAL +DEFAULT +12 __end__ - +.. +..: ........ +0 +NOTYPE +GLOBAL +DEFAULT +12 __bss_start - +.. +..: .......0 +0 +FUNC +GLOBAL +DEFAULT +14 app_func2 - +.. +..: 0*[^0]*.* +0 +FUNC +GLOBAL +DEFAULT +UND lib_func2 - +.. +..: ........ +0 +NOTYPE +GLOBAL +DEFAULT +12 _bss_end__ +Symbol table for image contains 13 entries: + +Num: +Value +Size +Type +Bind +Vis +Ndx +Name + +..: +00000000 +0 +NOTYPE +LOCAL +DEFAULT +UND + +..: +........ +0 +NOTYPE +GLOBAL +DEFAULT +12 _bss_end__ + +..: +........ +0 +NOTYPE +GLOBAL +DEFAULT +12 __bss_start__ + +..: 0*[^0]*.* +0 +FUNC +GLOBAL +DEFAULT +UND lib_func2 + +..: 0*[^0]*.* +0 +FUNC +GLOBAL +DEFAULT +UND lib_func1 + +..: +.......0 +0 +FUNC +GLOBAL +DEFAULT +14 app_func2 + +..: +........ +0 +NOTYPE +GLOBAL +DEFAULT +12 __bss_end__ + +..: +........ +0 +NOTYPE +GLOBAL +DEFAULT +12 __bss_start + +..: +........ +0 +NOTYPE +GLOBAL +DEFAULT +12 __end__ + +..: +........ +4 +OBJECT +GLOBAL +DEFAULT +12 data_obj + +..: +........ +0 +NOTYPE +GLOBAL +DEFAULT +11 _edata + +..: +........ +0 +NOTYPE +GLOBAL +DEFAULT +12 _end + +..: +........ +0 +NOTYPE +GLOBAL +DEFAULT +11 __data_start diff --git a/ld/testsuite/ld-arm/farcall-mixed-app2.sym b/ld/testsuite/ld-arm/farcall-mixed-app2.sym index 1d3bd1d..97cccf0 100644 --- a/ld/testsuite/ld-arm/farcall-mixed-app2.sym +++ b/ld/testsuite/ld-arm/farcall-mixed-app2.sym @@ -1,15 +1,16 @@ -Symbol table for image: - +Num +Buc: +Value +Size +Type +Bind +Vis +Ndx +Name - +.. +..: ........ +0 +NOTYPE +GLOBAL +DEFAULT +11 _edata - +.. +..: ........ +0 +NOTYPE +GLOBAL +DEFAULT +12 __bss_start__ - +.. +..: ........ +0 +NOTYPE +GLOBAL +DEFAULT +12 _end - +.. +..: ........ +4 +OBJECT +GLOBAL +DEFAULT +12 data_obj - +.. +..: ........ +0 +NOTYPE +GLOBAL +DEFAULT +12 __bss_end__ - +.. +..: 0*[^0]*.* +0 +FUNC +GLOBAL +DEFAULT +UND lib_func1 - +.. +..: ........ +0 +NOTYPE +GLOBAL +DEFAULT +11 __data_start - +.. +..: ........ +0 +NOTYPE +GLOBAL +DEFAULT +12 __end__ - +.. +..: ........ +0 +NOTYPE +GLOBAL +DEFAULT +12 __bss_start - +.. +..: .......0 +0 +FUNC +GLOBAL +DEFAULT +15 app_func2 - +.. +..: 0*[^0]*.* +0 +FUNC +GLOBAL +DEFAULT +UND lib_func2 - +.. +..: ........ +0 +NOTYPE +GLOBAL +DEFAULT +12 _bss_end__ +Symbol table for image contains 13 entries: + +Num: +Value +Size +Type +Bind +Vis +Ndx +Name + +..: +00000000 +0 +NOTYPE +LOCAL +DEFAULT +UND + +..: +........ +0 +NOTYPE +GLOBAL +DEFAULT +12 _bss_end__ + +..: +........ +0 +NOTYPE +GLOBAL +DEFAULT +12 __bss_start__ + +..: 0*[^0]*.* +0 +FUNC +GLOBAL +DEFAULT +UND lib_func2 + +..: 0*[^0]*.* +0 +FUNC +GLOBAL +DEFAULT +UND lib_func1 + +..: +.......0 +0 +FUNC +GLOBAL +DEFAULT +15 app_func2 + +..: +........ +0 +NOTYPE +GLOBAL +DEFAULT +12 __bss_end__ + +..: +........ +0 +NOTYPE +GLOBAL +DEFAULT +12 __bss_start + +..: +........ +0 +NOTYPE +GLOBAL +DEFAULT +12 __end__ + +..: +........ +4 +OBJECT +GLOBAL +DEFAULT +12 data_obj + +..: +........ +0 +NOTYPE +GLOBAL +DEFAULT +11 _edata + +..: +........ +0 +NOTYPE +GLOBAL +DEFAULT +12 _end + +..: +........ +0 +NOTYPE +GLOBAL +DEFAULT +11 __data_start diff --git a/ld/testsuite/ld-arm/fdpic-main-m.sym b/ld/testsuite/ld-arm/fdpic-main-m.sym index 9eaf617..6e655d6 100644 --- a/ld/testsuite/ld-arm/fdpic-main-m.sym +++ b/ld/testsuite/ld-arm/fdpic-main-m.sym @@ -1,14 +1,15 @@ -Symbol table for image: - +Num +Buc: +Value +Size +Type +Bind +Vis +Ndx +Name - +.. +..: ........ +0 +NOTYPE +GLOBAL +DEFAULT +12 _edata - +.. +..: ........ +0 +FUNC +GLOBAL +DEFAULT +UND my_shared_func2 - +.. +..: ........ +0 +NOTYPE +GLOBAL +DEFAULT +12 __bss_start__ - +.. +..: ........ +0 +NOTYPE +GLOBAL +DEFAULT +13 _end - +.. +..: ........ +0 +NOTYPE +GLOBAL +DEFAULT +13 __bss_end__ - +.. +..: ........ +0 +NOTYPE +GLOBAL +DEFAULT +13 __end__ - +.. +..: ........ +0 +NOTYPE +GLOBAL +DEFAULT + 9 __ROFIXUP_LIST__ - +.. +..: ........ +0 +NOTYPE +GLOBAL +DEFAULT +12 __bss_start - +.. +..: ........ +0 +NOTYPE +GLOBAL +DEFAULT + 9 __ROFIXUP_END__ - +.. +..: ........ +0 +FUNC +GLOBAL +DEFAULT +UND my_shared_func1 - +.. +..: ........ +0 +NOTYPE +GLOBAL +DEFAULT +13 _bss_end__ +Symbol table for image contains 12 entries: + +Num: +Value +Size +Type +Bind +Vis +Ndx +Name + +..: +00000000 +0 +NOTYPE +LOCAL +DEFAULT +UND + +..: +........ +0 +NOTYPE +GLOBAL +DEFAULT +13 _bss_end__ + +..: +........ +0 +NOTYPE +GLOBAL +DEFAULT +12 __bss_start__ + +..: +........ +0 +FUNC +GLOBAL +DEFAULT +UND my_shared_func1 + +..: +........ +0 +NOTYPE +GLOBAL +DEFAULT +13 __bss_end__ + +..: +........ +0 +NOTYPE +GLOBAL +DEFAULT +9 __ROFIXUP_END__ + +..: +........ +0 +NOTYPE +GLOBAL +DEFAULT +12 __bss_start + +..: +........ +0 +NOTYPE +GLOBAL +DEFAULT +9 __ROFIXUP_LIST__ + +..: +........ +0 +NOTYPE +GLOBAL +DEFAULT +13 __end__ + +..: +........ +0 +FUNC +GLOBAL +DEFAULT +UND my_shared_func2 + +..: +........ +0 +NOTYPE +GLOBAL +DEFAULT +12 _edata + +..: +........ +0 +NOTYPE +GLOBAL +DEFAULT +13 _end diff --git a/ld/testsuite/ld-arm/fdpic-main.sym b/ld/testsuite/ld-arm/fdpic-main.sym index 9eaf617..6e655d6 100644 --- a/ld/testsuite/ld-arm/fdpic-main.sym +++ b/ld/testsuite/ld-arm/fdpic-main.sym @@ -1,14 +1,15 @@ -Symbol table for image: - +Num +Buc: +Value +Size +Type +Bind +Vis +Ndx +Name - +.. +..: ........ +0 +NOTYPE +GLOBAL +DEFAULT +12 _edata - +.. +..: ........ +0 +FUNC +GLOBAL +DEFAULT +UND my_shared_func2 - +.. +..: ........ +0 +NOTYPE +GLOBAL +DEFAULT +12 __bss_start__ - +.. +..: ........ +0 +NOTYPE +GLOBAL +DEFAULT +13 _end - +.. +..: ........ +0 +NOTYPE +GLOBAL +DEFAULT +13 __bss_end__ - +.. +..: ........ +0 +NOTYPE +GLOBAL +DEFAULT +13 __end__ - +.. +..: ........ +0 +NOTYPE +GLOBAL +DEFAULT + 9 __ROFIXUP_LIST__ - +.. +..: ........ +0 +NOTYPE +GLOBAL +DEFAULT +12 __bss_start - +.. +..: ........ +0 +NOTYPE +GLOBAL +DEFAULT + 9 __ROFIXUP_END__ - +.. +..: ........ +0 +FUNC +GLOBAL +DEFAULT +UND my_shared_func1 - +.. +..: ........ +0 +NOTYPE +GLOBAL +DEFAULT +13 _bss_end__ +Symbol table for image contains 12 entries: + +Num: +Value +Size +Type +Bind +Vis +Ndx +Name + +..: +00000000 +0 +NOTYPE +LOCAL +DEFAULT +UND + +..: +........ +0 +NOTYPE +GLOBAL +DEFAULT +13 _bss_end__ + +..: +........ +0 +NOTYPE +GLOBAL +DEFAULT +12 __bss_start__ + +..: +........ +0 +FUNC +GLOBAL +DEFAULT +UND my_shared_func1 + +..: +........ +0 +NOTYPE +GLOBAL +DEFAULT +13 __bss_end__ + +..: +........ +0 +NOTYPE +GLOBAL +DEFAULT +9 __ROFIXUP_END__ + +..: +........ +0 +NOTYPE +GLOBAL +DEFAULT +12 __bss_start + +..: +........ +0 +NOTYPE +GLOBAL +DEFAULT +9 __ROFIXUP_LIST__ + +..: +........ +0 +NOTYPE +GLOBAL +DEFAULT +13 __end__ + +..: +........ +0 +FUNC +GLOBAL +DEFAULT +UND my_shared_func2 + +..: +........ +0 +NOTYPE +GLOBAL +DEFAULT +12 _edata + +..: +........ +0 +NOTYPE +GLOBAL +DEFAULT +13 _end diff --git a/ld/testsuite/ld-arm/fdpic-shared-m.sym b/ld/testsuite/ld-arm/fdpic-shared-m.sym index 1475370..801eaa7 100644 --- a/ld/testsuite/ld-arm/fdpic-shared-m.sym +++ b/ld/testsuite/ld-arm/fdpic-shared-m.sym @@ -1,15 +1,16 @@ -Symbol table for image: - +Num +Buc: +Value +Size +Type +Bind +Vis +Ndx +Name - +.. +..: ........ +0 +NOTYPE +GLOBAL +DEFAULT +9 _edata - +.. +..: ........ +12 +FUNC +GLOBAL +DEFAULT +6 my_shared_func2 - +.. +..: ........ +0 +NOTYPE +GLOBAL +DEFAULT +9 __bss_start__ - +.. +..: ........ +0 +NOTYPE +GLOBAL +DEFAULT +9 _end - +.. +..: ........ +6 +FUNC +GLOBAL +DEFAULT +6 my_shared_func3 - +.. +..: ........ +0 +NOTYPE +GLOBAL +DEFAULT +9 __bss_end__ - +.. +..: ........ +0 +NOTYPE +GLOBAL +DEFAULT +9 __end__ - +.. +..: ........ +0 +NOTYPE +GLOBAL +DEFAULT +7 __ROFIXUP_LIST__ - +.. +..: ........ +0 +NOTYPE +GLOBAL +DEFAULT +9 __bss_start - +.. +..: ........ +0 +NOTYPE +GLOBAL +DEFAULT +7 __ROFIXUP_END__ - +.. +..: ........ +2 +FUNC +GLOBAL +DEFAULT +6 my_shared_func1 - +.. +..: ........ +0 +NOTYPE +GLOBAL +DEFAULT +9 _bss_end__ +Symbol table for image contains 13 entries: + +Num: +Value +Size +Type +Bind +Vis +Ndx +Name + +..: +00000000 +0 +NOTYPE +LOCAL +DEFAULT +UND + +..: +........ +0 +NOTYPE +GLOBAL +DEFAULT +9 _bss_end__ + +..: +........ +0 +NOTYPE +GLOBAL +DEFAULT +9 __bss_start__ + +..: +........ +2 +FUNC +GLOBAL +DEFAULT +6 my_shared_func1 + +..: +........ +0 +NOTYPE +GLOBAL +DEFAULT +9 __bss_end__ + +..: +........ +6 +FUNC +GLOBAL +DEFAULT +6 my_shared_func3 + +..: +........ +0 +NOTYPE +GLOBAL +DEFAULT +7 __ROFIXUP_END__ + +..: +........ +0 +NOTYPE +GLOBAL +DEFAULT +9 __bss_start + +..: +........ +0 +NOTYPE +GLOBAL +DEFAULT +7 __ROFIXUP_LIST__ + +..: +........ +0 +NOTYPE +GLOBAL +DEFAULT +9 __end__ + +..: +........ +12 +FUNC +GLOBAL +DEFAULT +6 my_shared_func2 + +..: +........ +0 +NOTYPE +GLOBAL +DEFAULT +9 _edata + +..: +........ +0 +NOTYPE +GLOBAL +DEFAULT +9 _end diff --git a/ld/testsuite/ld-arm/fdpic-shared.sym b/ld/testsuite/ld-arm/fdpic-shared.sym index 2938b36..e11fbdd 100644 --- a/ld/testsuite/ld-arm/fdpic-shared.sym +++ b/ld/testsuite/ld-arm/fdpic-shared.sym @@ -1,15 +1,16 @@ -Symbol table for image: - +Num +Buc: +Value +Size +Type +Bind +Vis +Ndx +Name - +.. +..: ........ +0 +NOTYPE +GLOBAL +DEFAULT +9 _edata - +.. +..: ........ +20 +FUNC +GLOBAL +DEFAULT +6 my_shared_func2 - +.. +..: ........ +0 +NOTYPE +GLOBAL +DEFAULT +9 __bss_start__ - +.. +..: ........ +0 +NOTYPE +GLOBAL +DEFAULT +9 _end - +.. +..: ........ +8 +FUNC +GLOBAL +DEFAULT +6 my_shared_func3 - +.. +..: ........ +0 +NOTYPE +GLOBAL +DEFAULT +9 __bss_end__ - +.. +..: ........ +0 +NOTYPE +GLOBAL +DEFAULT +9 __end__ - +.. +..: ........ +0 +NOTYPE +GLOBAL +DEFAULT +7 __ROFIXUP_LIST__ - +.. +..: ........ +0 +NOTYPE +GLOBAL +DEFAULT +9 __bss_start - +.. +..: ........ +0 +NOTYPE +GLOBAL +DEFAULT +7 __ROFIXUP_END__ - +.. +..: ........ +4 +FUNC +GLOBAL +DEFAULT +6 my_shared_func1 - +.. +..: ........ +0 +NOTYPE +GLOBAL +DEFAULT +9 _bss_end__ +Symbol table for image contains 13 entries: + +Num: +Value +Size +Type +Bind +Vis +Ndx +Name + +..: +00000000 +0 +NOTYPE +LOCAL +DEFAULT +UND + +..: +........ +0 +NOTYPE +GLOBAL +DEFAULT +9 _bss_end__ + +..: +........ +0 +NOTYPE +GLOBAL +DEFAULT +9 __bss_start__ + +..: +........ +4 +FUNC +GLOBAL +DEFAULT +6 my_shared_func1 + +..: +........ +0 +NOTYPE +GLOBAL +DEFAULT +9 __bss_end__ + +..: +........ +8 +FUNC +GLOBAL +DEFAULT +6 my_shared_func3 + +..: +........ +0 +NOTYPE +GLOBAL +DEFAULT +7 __ROFIXUP_END__ + +..: +........ +0 +NOTYPE +GLOBAL +DEFAULT +9 __bss_start + +..: +........ +0 +NOTYPE +GLOBAL +DEFAULT +7 __ROFIXUP_LIST__ + +..: +........ +0 +NOTYPE +GLOBAL +DEFAULT +9 __end__ + +..: +........ +20 +FUNC +GLOBAL +DEFAULT +6 my_shared_func2 + +..: +........ +0 +NOTYPE +GLOBAL +DEFAULT +9 _edata + +..: +........ +0 +NOTYPE +GLOBAL +DEFAULT +9 _end diff --git a/ld/testsuite/ld-arm/mixed-app.sym b/ld/testsuite/ld-arm/mixed-app.sym index cfa35f5..c249f4d 100644 --- a/ld/testsuite/ld-arm/mixed-app.sym +++ b/ld/testsuite/ld-arm/mixed-app.sym @@ -1,15 +1,16 @@ -Symbol table for image: - +Num +Buc: +Value +Size +Type +Bind +Vis +Ndx +Name - +.. +..: ........ +0 +NOTYPE +GLOBAL +DEFAULT +11 _edata - +.. +..: ........ +0 +NOTYPE +GLOBAL +DEFAULT +12 __bss_start__ - +.. +..: ........ +0 +NOTYPE +GLOBAL +DEFAULT +12 _end - +.. +..: ........ +4 +OBJECT +GLOBAL +DEFAULT +12 data_obj - +.. +..: ........ +0 +NOTYPE +GLOBAL +DEFAULT +12 __bss_end__ - +.. +..: 0*[^0]*.* +0 +FUNC +GLOBAL +DEFAULT +UND lib_func1 - +.. +..: ........ +0 +NOTYPE +GLOBAL +DEFAULT +11 __data_start - +.. +..: ........ +0 +NOTYPE +GLOBAL +DEFAULT +12 __end__ - +.. +..: ........ +0 +NOTYPE +GLOBAL +DEFAULT +12 __bss_start - +.. +..: .......0 +0 +FUNC +GLOBAL +DEFAULT +8 app_func2 - +.. +..: 0*[^0]*.* +0 +FUNC +GLOBAL +DEFAULT +UND lib_func2 - +.. +..: ........ +0 +NOTYPE +GLOBAL +DEFAULT +12 _bss_end__ +Symbol table for image contains 13 entries: + +Num: +Value +Size +Type +Bind +Vis +Ndx +Name + +..: +00000000 +0 +NOTYPE +LOCAL +DEFAULT +UND + +..: +........ +0 +NOTYPE +GLOBAL +DEFAULT +12 _bss_end__ + +..: +........ +0 +NOTYPE +GLOBAL +DEFAULT +12 __bss_start__ + +..: 0*[^0]*.* +0 +FUNC +GLOBAL +DEFAULT +UND lib_func2 + +..: 0*[^0]*.* +0 +FUNC +GLOBAL +DEFAULT +UND lib_func1 + +..: +.......0 +0 +FUNC +GLOBAL +DEFAULT +8 app_func2 + +..: +........ +0 +NOTYPE +GLOBAL +DEFAULT +12 __bss_end__ + +..: +........ +0 +NOTYPE +GLOBAL +DEFAULT +12 __bss_start + +..: +........ +0 +NOTYPE +GLOBAL +DEFAULT +12 __end__ + +..: +........ +4 +OBJECT +GLOBAL +DEFAULT +12 data_obj + +..: +........ +0 +NOTYPE +GLOBAL +DEFAULT +11 _edata + +..: +........ +0 +NOTYPE +GLOBAL +DEFAULT +12 _end + +..: +........ +0 +NOTYPE +GLOBAL +DEFAULT +11 __data_start diff --git a/ld/testsuite/ld-arm/mixed-lib.sym b/ld/testsuite/ld-arm/mixed-lib.sym index f5b16dc..f14aeed 100644 --- a/ld/testsuite/ld-arm/mixed-lib.sym +++ b/ld/testsuite/ld-arm/mixed-lib.sym @@ -1,15 +1,16 @@ -Symbol table for image: - +Num +Buc: +Value +Size +Type +Bind +Vis +Ndx +Name - +.. +..: ........ +0 +NOTYPE +GLOBAL +DEFAULT +9 _edata - +.. +..: ........ +0 +NOTYPE +GLOBAL +DEFAULT +9 __bss_start__ - +.. +..: ........ +0 +NOTYPE +GLOBAL +DEFAULT +9 _end - +.. +..: ........ +4 +OBJECT +GLOBAL +DEFAULT +9 data_obj - +.. +..: ........ +0 +NOTYPE +GLOBAL +DEFAULT +9 __bss_end__ - +.. +..: .......0 +20 +FUNC +GLOBAL +DEFAULT +6 lib_func1 - +.. +..: ........ +0 +NOTYPE +GLOBAL +DEFAULT +9 __data_start - +.. +..: ........ +0 +NOTYPE +GLOBAL +DEFAULT +9 __end__ - +.. +..: ........ +0 +NOTYPE +GLOBAL +DEFAULT +9 __bss_start - +.. +..: 00000000 +0 +NOTYPE +GLOBAL +DEFAULT +UND app_func2 - +.. +..: .......1 +2 +FUNC +GLOBAL +DEFAULT +6 lib_func2 - +.. +..: ........ +0 +NOTYPE +GLOBAL +DEFAULT +9 _bss_end__ +Symbol table for image contains 13 entries: + +Num: +Value +Size +Type +Bind +Vis +Ndx +Name + +..: +00000000 +0 +NOTYPE +LOCAL +DEFAULT +UND + +..: +........ +0 +NOTYPE +GLOBAL +DEFAULT +9 _bss_end__ + +..: +........ +0 +NOTYPE +GLOBAL +DEFAULT +9 __bss_start__ + +..: +.......1 +2 +FUNC +GLOBAL +DEFAULT +6 lib_func2 + +..: +.......0 +20 +FUNC +GLOBAL +DEFAULT +6 lib_func1 + +..: +00000000 +0 +NOTYPE +GLOBAL +DEFAULT +UND app_func2 + +..: +........ +0 +NOTYPE +GLOBAL +DEFAULT +9 __bss_end__ + +..: +........ +0 +NOTYPE +GLOBAL +DEFAULT +9 __bss_start + +..: +........ +0 +NOTYPE +GLOBAL +DEFAULT +9 __end__ + +..: +........ +4 +OBJECT +GLOBAL +DEFAULT +9 data_obj + +..: +........ +0 +NOTYPE +GLOBAL +DEFAULT +9 _edata + +..: +........ +0 +NOTYPE +GLOBAL +DEFAULT +9 _end + +..: +........ +0 +NOTYPE +GLOBAL +DEFAULT +9 __data_start diff --git a/ld/testsuite/ld-arm/preempt-app.sym b/ld/testsuite/ld-arm/preempt-app.sym index ec1d6be..31c01cc 100644 --- a/ld/testsuite/ld-arm/preempt-app.sym +++ b/ld/testsuite/ld-arm/preempt-app.sym @@ -1,14 +1,15 @@ -Symbol table for image: - +Num +Buc: +Value +Size +Type +Bind +Vis +Ndx +Name - +.. +..: ........ +0 +NOTYPE +GLOBAL +DEFAULT +9 _edata - +.. +..: ........ +0 +NOTYPE +GLOBAL +DEFAULT +10 __bss_start__ - +.. +..: ........ +0 +NOTYPE +GLOBAL +DEFAULT +10 _end - +.. +..: ........ +4 +OBJECT +GLOBAL +DEFAULT +10 data_obj - +.. +..: ........ +0 +NOTYPE +GLOBAL +DEFAULT +10 __bss_end__ - +.. +..: .......1 +20 +FUNC +GLOBAL +DEFAULT +6 lib_func1 - +.. +..: ........ +0 +NOTYPE +GLOBAL +DEFAULT +9 __data_start - +.. +..: ........ +0 +NOTYPE +GLOBAL +DEFAULT +10 __end__ - +.. +..: ........ +0 +NOTYPE +GLOBAL +DEFAULT +10 __bss_start - +.. +..: .......0 +0 +FUNC +GLOBAL +DEFAULT +6 app_func2 - +.. +..: ........ +0 +NOTYPE +GLOBAL +DEFAULT +10 _bss_end__ +Symbol table for image contains 12 entries: + +Num: +Value +Size +Type +Bind +Vis +Ndx +Name + +..: +00000000 +0 +NOTYPE +LOCAL +DEFAULT +UND + +..: +........ +0 +NOTYPE +GLOBAL +DEFAULT +10 _bss_end__ + +..: +........ +0 +NOTYPE +GLOBAL +DEFAULT +10 __bss_start__ + +..: +.......1 +20 +FUNC +GLOBAL +DEFAULT +6 lib_func1 + +..: +.......0 +0 +FUNC +GLOBAL +DEFAULT +6 app_func2 + +..: +........ +0 +NOTYPE +GLOBAL +DEFAULT +10 __bss_end__ + +..: +........ +0 +NOTYPE +GLOBAL +DEFAULT +10 __bss_start + +..: +........ +0 +NOTYPE +GLOBAL +DEFAULT +10 __end__ + +..: +........ +4 +OBJECT +GLOBAL +DEFAULT +10 data_obj + +..: +........ +0 +NOTYPE +GLOBAL +DEFAULT +9 _edata + +..: +........ +0 +NOTYPE +GLOBAL +DEFAULT +10 _end + +..: +........ +0 +NOTYPE +GLOBAL +DEFAULT +9 __data_start diff --git a/ld/testsuite/ld-elf/hash.d b/ld/testsuite/ld-elf/hash.d index d21c1c9..61d84e4 100644 --- a/ld/testsuite/ld-elf/hash.d +++ b/ld/testsuite/ld-elf/hash.d @@ -10,11 +10,11 @@ #... +0x[0-9a-z]+ +\(GNU_HASH\) +0x[0-9a-z]+ #... - +[0-9]+ +[0-9]+: +[0-9a-f]+ +[0-9]+ +NOTYPE +GLOBAL +DEFAULT +[1-9] _start + +[0-9]+: +[0-9a-f]+ +[0-9]+ +NOTYPE +GLOBAL +DEFAULT +[1-9] _start #... - +[0-9]+ +[0-9]+: +[0-9a-f]+ +[0-9]+ +NOTYPE +GLOBAL +DEFAULT +[1-9] main + +[0-9]+: +[0-9a-f]+ +[0-9]+ +NOTYPE +GLOBAL +DEFAULT +[1-9] main #... - +[0-9]+ +[0-9]+: +[0-9a-f]+ +[0-9]+ +NOTYPE +GLOBAL +DEFAULT +[1-9] start + +[0-9]+: +[0-9a-f]+ +[0-9]+ +NOTYPE +GLOBAL +DEFAULT +[1-9] start #... - +[0-9]+ +[0-9]+: +[0-9a-f]+ +[0-9]+ +NOTYPE +GLOBAL +DEFAULT +[1-9] __start + +[0-9]+: +[0-9a-f]+ +[0-9]+ +NOTYPE +GLOBAL +DEFAULT +[1-9] __start #... diff --git a/ld/testsuite/ld-elf/pr13195.d b/ld/testsuite/ld-elf/pr13195.d index 4e58929..c22de0e 100644 --- a/ld/testsuite/ld-elf/pr13195.d +++ b/ld/testsuite/ld-elf/pr13195.d @@ -5,5 +5,5 @@ # generic linker targets don't support --gc-sections, nor do a bunch of others #... - +[0-9]+ +[0-9]+: +[0-9a-f]+ +[0-9]+ +FUNC +GLOBAL +DEFAULT +[1-9]+ foo + +[0-9]+: +[0-9a-f]+ +[0-9]+ +FUNC +GLOBAL +DEFAULT +[1-9]+ foo@@VERS_2.0 #pass diff --git a/ld/testsuite/ld-elfvsb/hidden2.d b/ld/testsuite/ld-elfvsb/hidden2.d index 72a42d5..5d29974 100644 --- a/ld/testsuite/ld-elfvsb/hidden2.d +++ b/ld/testsuite/ld-elfvsb/hidden2.d @@ -3,7 +3,7 @@ #readelf: -Ds # It is also ok to remove this symbol, but we currently make it local. -Symbol table for image: +Symbol table for image contains [0-9]+ entries: #... -[ ]*[0-9]+ +[0-9]+: [0-9a-fA-F]* +0 +OBJECT +LOCAL +DEFAULT .* foo +[ ]*[0-9]+: [0-9a-fA-F]* +0 +OBJECT +LOCAL +DEFAULT .* foo #pass diff --git a/ld/testsuite/ld-mips-elf/hash2.d b/ld/testsuite/ld-mips-elf/hash2.d index 122edb8..aec48e1 100644 --- a/ld/testsuite/ld-mips-elf/hash2.d +++ b/ld/testsuite/ld-mips-elf/hash2.d @@ -6,11 +6,11 @@ #... +0x[0-9a-z]+ +\(MIPS_XHASH\) +0x[0-9a-z]+ #... - +[0-9]+ +[0-9]+: +[0-9a-f]+ +[0-9]+ +FUNC +GLOBAL +DEFAULT +([1-9]|PRC) _start + +[0-9]+: +[0-9a-f]+ +[0-9]+ +FUNC +GLOBAL +DEFAULT +([1-9]|PRC\[[0x[0-9a-f]+\]) __start #... - +[0-9]+ +[0-9]+: +[0-9a-f]+ +[0-9]+ +FUNC +GLOBAL +DEFAULT +([1-9]|PRC) main + +[0-9]+: +[0-9a-f]+ +[0-9]+ +FUNC +GLOBAL +DEFAULT +([1-9]|PRC\[[0x[0-9a-f]+\]) _start #... - +[0-9]+ +[0-9]+: +[0-9a-f]+ +[0-9]+ +FUNC +GLOBAL +DEFAULT +([1-9]|PRC) start + +[0-9]+: +[0-9a-f]+ +[0-9]+ +FUNC +GLOBAL +DEFAULT +([1-9]|PRC\[[0x[0-9a-f]+\]) main #... - +[0-9]+ +[0-9]+: +[0-9a-f]+ +[0-9]+ +FUNC +GLOBAL +DEFAULT +([1-9]|PRC) __start + +[0-9]+: +[0-9a-f]+ +[0-9]+ +FUNC +GLOBAL +DEFAULT +([1-9]|PRC\[[0x[0-9a-f]+\]) start #... |