aboutsummaryrefslogtreecommitdiff
path: root/gas/config
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@novell.com>2009-07-27 10:04:25 +0000
committerJan Beulich <jbeulich@novell.com>2009-07-27 10:04:25 +0000
commitefa19bfde4d57f33974cac17dfddb18f6f460f43 (patch)
treea54004628ab9a90b64e32ae145f1ff920d0eb5ee /gas/config
parent7859b21da558a842c9d35c3cae480e38204d9892 (diff)
downloadgdb-efa19bfde4d57f33974cac17dfddb18f6f460f43.zip
gdb-efa19bfde4d57f33974cac17dfddb18f6f460f43.tar.gz
gdb-efa19bfde4d57f33974cac17dfddb18f6f460f43.tar.bz2
gas/
2009-07-27 Jan Beulich <jbeulich@novell.com> * obj-elf.c (elf_file_symbol): Replace symbol name set up by symbol_new() with the passed in, unmodified one. gas/testsuite/ 2009-07-27 Jan Beulich <jbeulich@novell.com> * gas/elf/file.[ds]: New. * gas/elf/elf.exp: Run new test.
Diffstat (limited to 'gas/config')
-rw-r--r--gas/config/obj-elf.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gas/config/obj-elf.c b/gas/config/obj-elf.c
index f85267b..51cd3a9 100644
--- a/gas/config/obj-elf.c
+++ b/gas/config/obj-elf.c
@@ -260,9 +260,20 @@ elf_file_symbol (const char *s, int appfile)
|| (symbol_rootP->bsym->flags & BSF_FILE) == 0)
{
symbolS *sym;
+ unsigned int name_length;
sym = symbol_new (s, absolute_section, 0, NULL);
symbol_set_frag (sym, &zero_address_frag);
+
+ name_length = strlen (s);
+ if (name_length > strlen (S_GET_NAME (sym)))
+ {
+ obstack_grow (&notes, s, name_length + 1);
+ S_SET_NAME (sym, obstack_finish (&notes));
+ }
+ else
+ strcpy ((char *) S_GET_NAME (sym), s);
+
symbol_get_bfdsym (sym)->flags |= BSF_FILE;
if (symbol_rootP != sym)