aboutsummaryrefslogtreecommitdiff
path: root/gas/testsuite
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2009-07-23 13:00:30 +0000
committerNick Clifton <nickc@redhat.com>2009-07-23 13:00:30 +0000
commit3e7a7d11f1106a451c26b49fcb8fafb5059fd684 (patch)
treeb3d0c290c25b650e408ec3f60e770f56bb1f5be6 /gas/testsuite
parent6ec8e7022b6b6a69ee682d1797e8bfec473aae11 (diff)
downloadgdb-3e7a7d11f1106a451c26b49fcb8fafb5059fd684.zip
gdb-3e7a7d11f1106a451c26b49fcb8fafb5059fd684.tar.gz
gdb-3e7a7d11f1106a451c26b49fcb8fafb5059fd684.tar.bz2
* config/obj-elf.c (obj_elf_type): Add code to support a type of
gnu_unique_object. * doc/as.texinfo: Document new feature of .type directive. * NEWS: Mention support for gnu_unique_object symbol type. * common.h (STB_GNU_UNIQUE): Define. * NEWS: Mention the linker's support for symbols with a binding of STB_GNU_UNIQUE. * gas/elf/type.s: Add unique global symbol definition. * gas/elf/type.e: Add expected readelf output for global unique symbol. * elfcpp.h (enum STB): Add STB_GNU_UNIQUE. * readelf.c (get_symbol_binding): For Linux targeted files return UNIQUE for symbols with the STB_GNU_UNIQUE binding. * doc/binutils.texi: Document the meaning of the 'u' symbol binding in the output of nm and objdump --syms. * elf-bfd.h (struct elf_link_hash_entry): Add unique_global field. * elf.c (swap_out_syms): Set binding to STB_GNU_UNIQUE for symbols with the BSF_GNU_UNIQUE flag bit set. * elfcode.h (elf_slurp_symbol_table): Set the BSF_GNU_UNIQUE flag for symbols with STB_GNU_UNIQUE binding. * elflink.c (_bfd_elf_merge_symbol): Set unique_global for symbols with the STB_GNU_UNIQUE binding. (elf_link_add_object_symbols): Set the BSF_GNU_UNIQUE flag for symbols with STB_GNU_UNIQUE binding. Set STB_GNU_UNIQUE for symbols with the unique_global field set. (elf_link_output_extsym): Set unique_global field for symbols with the STB_GNU_UNIQUE binding. * syms.c (struct bfd_symbol): Define BSF_GNU_UNIQUE flag bit. (bfd_print_symbol_vandf): Print a 'u' character for BSF_GNU_UNIQUE symbols. (bfd_decode_symclass): Return a 'u' character for BSF_GNU_UNIQUE symbols. * bfd-in2.h: Regenerate.
Diffstat (limited to 'gas/testsuite')
-rw-r--r--gas/testsuite/ChangeLog6
-rw-r--r--gas/testsuite/gas/elf/type.e1
-rw-r--r--gas/testsuite/gas/elf/type.s11
3 files changed, 18 insertions, 0 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index a5d0bdb..a30164b 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2009-07-23 Ulrich Drepper <drepper@redhat.com>
+
+ * gas/elf/type.s: Add unique global symbol definition.
+ * gas/elf/type.e: Add expected readelf output for global unique
+ symbol.
+
2009-07-21 H.J. Lu <hongjiu.lu@intel.com>
PR gas/10420
diff --git a/gas/testsuite/gas/elf/type.e b/gas/testsuite/gas/elf/type.e
index 95d846a..2d26af8 100644
--- a/gas/testsuite/gas/elf/type.e
+++ b/gas/testsuite/gas/elf/type.e
@@ -3,4 +3,5 @@
.: 0+0 1 OBJECT LOCAL DEFAULT . object
.: 0+1 1 TLS LOCAL DEFAULT . tls_object
..: 0+2 1 NOTYPE LOCAL DEFAULT . notype
+ ..: 0+3 1 OBJECT UNIQUE DEFAULT . unique_global
..: 0+1 1 (COMMON|OBJECT) GLOBAL DEFAULT COM common
diff --git a/gas/testsuite/gas/elf/type.s b/gas/testsuite/gas/elf/type.s
index 8620cc2..159bf6d 100644
--- a/gas/testsuite/gas/elf/type.s
+++ b/gas/testsuite/gas/elf/type.s
@@ -1,24 +1,35 @@
.text
+
.size function,1
.type function,%function
function:
.byte 0x0
+
.size indirect_function,1
.type indirect_function,%gnu_indirect_function
indirect_function:
.byte 0x0
+
.data
+
.type object,%object
.size object,1
object:
.byte 0x0
.type tls_object,%tls_object
+
.size tls_object,1
tls_object:
.byte 0x0
.type notype,%notype
+
.size notype,1
notype:
.byte 0x0
.comm common, 1
.type common,STT_COMMON
+
+ .type unique_global,%gnu_unique_object
+unique_global:
+ .byte 0x0
+ .size unique_global,1