bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: make check (ld/tbss) fails with CVS HEAD (2004-05-17)


From: Nick Clifton
Subject: Re: make check (ld/tbss) fails with CVS HEAD (2004-05-17)
Date: Tue, 18 May 2004 17:31:30 +0100
User-agent: Mozilla Thunderbird 0.6 (X11/20040502)

Hi Erik,


/tmp/binutils-cvs/ld/testsuite/ld-elf/tbss.s:
Assembler messages:
/tmp/binutils-cvs/ld/testsuite/ld-elf/tbss.s:3: Error:
junk at end of line, first unrecognized character is
`,'

This is a problem with GAS for ARM. According to ARM's own assembler specification the @ character starts a comment so it cannot be used in .section directives to set up the type. Fortunately there is a simple workaround which it to use the % character instead. GAS (handily) will allow this character in place of @ for all ELF based ports, so we do not need special versions of the test sources just for the arm-linux and arm-elf targets.

Whilst fixing this, I also found that the tbss.s file was using the .align directive. This is another problem for an ARM targeted GAS since ARM mandates that .align takes a power-of-two argument whereas most other assemblers assume that it takes an ordinary integer. The solution here is to use the .p2align directive which has a fixed meaning for all targets.

Hence I am applying the attached patch to fix up these test cases so that they will assemble with an arm-linux or arm-elf toolchain.

Cheers
  Nick

ld/testsuite/ChangeLog
2004-05-18  Nick Clifton  <address@hidden>

        * ld-elf/frame.s: Replace @ with % so that the file can be
        compiled by an ARM targeted GAS.
        * ld-elf/table.s: Likewise.
        * ld-elf/tbss.s: Likewise.  Also replace .align <foo> with
        .p2align (log2 <foo>) to cope with the fact that the ARM .align
        directive takes a power-of-two argument.

Index: ld/testsuite/ld-elf/frame.s
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-elf/frame.s,v
retrieving revision 1.1
diff -c -3 -p -r1.1 frame.s
*** ld/testsuite/ld-elf/frame.s 17 May 2004 17:38:46 -0000      1.1
--- ld/testsuite/ld-elf/frame.s 18 May 2004 16:13:42 -0000
***************
*** 1,2 ****
!       .section        .eh_frame,"a",@progbits
        .4byte  0
--- 1,2 ----
!       .section        .eh_frame,"a",%progbits
        .4byte  0
Index: ld/testsuite/ld-elf/table.s
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-elf/table.s,v
retrieving revision 1.1
diff -c -3 -p -r1.1 table.s
*** ld/testsuite/ld-elf/table.s 17 May 2004 17:38:46 -0000      1.1
--- ld/testsuite/ld-elf/table.s 18 May 2004 16:13:42 -0000
***************
*** 1 ****
!       .section        .gcc_except_table,"a",@progbits
--- 1 ----
!       .section        .gcc_except_table,"a",%progbits
Index: ld/testsuite/ld-elf/tbss.s
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-elf/tbss.s,v
retrieving revision 1.1
diff -c -3 -p -r1.1 tbss.s
*** ld/testsuite/ld-elf/tbss.s  17 May 2004 17:38:46 -0000      1.1
--- ld/testsuite/ld-elf/tbss.s  18 May 2004 16:13:42 -0000
***************
*** 1,15 ****
        .file   "x.c"
  .globl bss
!       .section        .bss,"aw",@nobits
!       .align 4096
!       .type   bss,@object
        .size   bss,4096
  bss:
        .zero   4096
  .globl tbss
!       .section        .tbss,"awT",@nobits
!       .align 4096
!       .type   tbss,@object
        .size   tbss,4096
  tbss:
        .zero   4096
--- 1,15 ----
        .file   "x.c"
  .globl bss
!       .section        .bss,"aw",%nobits
!       .p2align 12
!       .type   bss,%object
        .size   bss,4096
  bss:
        .zero   4096
  .globl tbss
!       .section        .tbss,"awT",%nobits
!       .p2align 12
!       .type   tbss,%object
        .size   tbss,4096
  tbss:
        .zero   4096

reply via email to

[Prev in Thread] Current Thread [Next in Thread]