bug-binutils
[Top][All Lists]
Advanced

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

[Bug gas/20427] New: Solaris rtld on SPARC does not allow R_SPARC_UA64 o


From: stefan.teleman at oracle dot com
Subject: [Bug gas/20427] New: Solaris rtld on SPARC does not allow R_SPARC_UA64 or R_SPARC_64 relocations in 32-bit executables
Date: Mon, 01 Aug 2016 14:54:05 +0000

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

            Bug ID: 20427
           Summary: Solaris rtld on SPARC does not allow R_SPARC_UA64 or
                    R_SPARC_64 relocations in 32-bit executables
           Product: binutils
           Version: 2.25
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: gas
          Assignee: unassigned at sourceware dot org
          Reporter: stefan.teleman at oracle dot com
  Target Milestone: ---
              Host: sparc-sun-solaris2.12
            Target: sparc-sun-solaris2.12

Created attachment 9415
  --> https://sourceware.org/bugzilla/attachment.cgi?id=9415&action=edit
test case demonstrating the bug

This bug is present in Binutils 2.25.1 and 2.26.1.

This bug can be verified on Solaris 11 as well as Solaris 12.

With a hand-written SPARC assembler translation unit, containing
the following:

    .data
    .align 8
    .global .gomp_critical_user_
    .comm .gomp_critical_user_, 64, 8

The resulting 32-bit SPARC *.o ELF -- asembled with gas - is then
linked into a shared library.

When linking this shared library in a 32-bit SPARC program, trying to
run the test program results in:

ld.so.1: main32: fatal: relocation error: file
/builds/steleman/userland-s12-binutils-gas-24380705/components/binutils/build/sparcv9/gas/libtest32.so:
 symbol .gomp_critical_user_: invalid relocation type for ELFCLASS32: 54
./testit-gcc.sh: line 29: 441437 Killed                  ./main32

The link-editing itself succeeds without warnings.

The attachment gnu-as-bad-reloc-test.tar.bz2 demonstrates the bug.

The proposed patch (attached) cures this bug. The 32-bit test program
now succeeds, and works as expected.

-- 
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]