bug-binutils
[Top][All Lists]
Advanced

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

[Bug ld/30078] FAIL: merge4


From: nickc at redhat dot com
Subject: [Bug ld/30078] FAIL: merge4
Date: Tue, 14 Feb 2023 16:57:15 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=30078

Nick Clifton <nickc at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nickc at redhat dot com
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at sourceware dot org   |nickc at redhat dot com

--- Comment #1 from Nick Clifton <nickc at redhat dot com> ---
Hi John,

   Just a guess, but I think that this might be a bug/feature of the HPPA
   port of gas:

     % as ld/testsuite/ld-elf/merge4b.s -o merge4b.o
     % readelf -x.rodata.str1.1 merge4b.o
     Hex dump of section '.rodata.str1.1':
       0x00000000 666f6f62 61727768 61746576 6572     foobarwhatever

   Notice how there is no nul-byte between foobar and whatever...  In fact
   there ought to be 2 nul bytes since there is an empty string between
   them:

    % cat ld/testsuite/ld-elf/merge4b.s
    [...]
        .string "foobar"
    1:
        .string ""
        .string "whatever"

   Looking at the assembler sources, it appears that this might be deliberate.
   The default function for handling the .string directive appends a nul byte 
   to the end of the strings, but the HPPA version does not.  (See gas/config/
   tc-hppa.c: md_pseudo_table[]).

   This does suggest a possible workaround - the HPPA port of gas handles the
   .string directive as mentioned above, but it does not handle .asciz.  So if
   the merge4b.s file were to use that directive, the test might work...  Any
   chance that you could test this out ?  (I do not have an HPPA test 
   environment).

Cheers
  Nick

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

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