This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ppc-gas: Add '+' and '-' to symbol chars list


Hi Alan,

> It's still broken.
> 
> $ cat xxx.s
>         .data
>         .type   x,@object
>         .size   x,4
> x:
>         .word 12
>         .symver x, x at VERS dot 0
> $ gas/as-new xxx.s
> xxx.s: Assembler messages:
> xxx.s:6: Error: missing version name in `' for symbol `x'
> xxx.s:6: Warning: rest of line ignored; first ignored character is ` '

The patch below takes care of this problem.

It does raise an issue though - are there other places where we need
to insert a SKIP_WHITESPACE ?

I ma also including an addition to the testsuite to check for this
bug.  I will check the patches into the branch as well.

Cheers
        Nick

gas/ChangeLog
2003-04-29  Nick Clifton  <nickc at redhat dot com>

	* config/obj-elf.c (obj_elf_symver): Skip whitespace before the
	start of a version name.

gas/testsuite/ChangeLog
2003-04-29  Nick Clifton  <nickc at redhat dot com>

	* gas/elf/elf.exp: Invoke symver test.
        * gas/elf/symver.s: New test case.
        * gas/elf/symver.d: Expected output.

Index: gas/config/obj-elf.c
===================================================================
RCS file: /cvs/src/src/gas/config/obj-elf.c,v
retrieving revision 1.62
diff -c -3 -p -w -r1.62 obj-elf.c
*** gas/config/obj-elf.c	4 Feb 2003 12:34:08 -0000	1.62
--- gas/config/obj-elf.c	29 Apr 2003 10:53:34 -0000
*************** obj_elf_symver (ignore)
*** 1269,1274 ****
--- 1269,1275 ----
      }
  
    ++input_line_pointer;
+   SKIP_WHITESPACE ();
    name = input_line_pointer;
  
    /* Temporarily include '@' in symbol names.  */

Index: testsuite/gas/elf/elf.exp
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/elf/elf.exp,v
retrieving revision 1.15
diff -c -3 -p -w -r1.15 elf.exp
*** testsuite/gas/elf/elf.exp	25 Mar 2003 20:55:59 -0000	1.15
--- testsuite/gas/elf/elf.exp	29 Apr 2003 11:48:22 -0000
*************** if { ([istarget "*-*-elf*"]		
*** 53,56 ****
--- 53,57 ----
      run_dump_test "section0" 
      run_dump_test "section1" 
      run_list_test "section2" "$target_machine" "-al"
+     run_dump_test "symver" 
  }
*** /dev/null	Thu Jan 30 10:24:37 2003
--- testsuite/gas/elf/symver.s	Tue Apr 29 11:53:03 2003
***************
*** 0 ****
--- 1,6 ----
+         .data
+         .type   x,@object
+         .size   x,4
+ x:
+         .word 12
+         .symver x, x at VERS dot 0
*** /dev/null	Thu Jan 30 10:24:37 2003
--- testsuite/gas/elf/symver.d	Tue Apr 29 12:37:44 2003
***************
*** 0 ****
--- 1,17 ----
+ #objdump: --syms
+ #name: ELF symbol versioning
+ #
+ # The #... and #pass are there to match extra symbols inserted by
+ # some toolchains, eg the mips-elf port will add .reginfo and .ptrd
+ 
+ dump.o:     file format .*
+ 
+ SYMBOL TABLE:
+ 
+ 0+000 l.*d.*\.text.*0+000.*
+ 0+000 l.*d.*\.data.*0+000.*
+ 0+000 l.*d.*\.bss.*0+000.*
+ #...
+ 0+000 l.*O.*\.data.*0+004 x
+ 0+000 l.*O.*\.data.*0+004 x at VERS\ dot 0
+ #pass


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]