bug-binutils
[Top][All Lists]
Advanced

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

[Bug ld/16467] New: ld fails with internal error in elf_x86_64_relocate_


From: zbyszek at in dot waw.pl
Subject: [Bug ld/16467] New: ld fails with internal error in elf_x86_64_relocate_section when .symver and ifunc magic is used
Date: Sun, 19 Jan 2014 03:38:31 +0000

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

            Bug ID: 16467
           Summary: ld fails with internal error in
                    elf_x86_64_relocate_section when .symver and ifunc
                    magic is used
           Product: binutils
           Version: 2.24
            Status: NEW
          Severity: normal
          Priority: P2
         Component: ld
          Assignee: unassigned at sourceware dot org
          Reporter: zbyszek at in dot waw.pl

We are merging two libraries into one. I was trying to create a compatibility
library to allow existing programs compiled for the old name to continue to
work without recompilation (see [1] for background story).

A short reproducer:
--------------------------------------------------
$ tail liba.c libb.c liba.sym
==> liba.c <==
int sd_get_seats(void) {return 0;}

==> libb.c <==
void new_sd_get_seats(void);
__asm__(".symver new_sd_get_seats,address@hidden");
static void (*resolve_sd_get_seats(void)) (void) {
        return new_sd_get_seats;
}
void sd_get_seats(void) __attribute__((ifunc("resolve_sd_get_seats")));

==> liba.sym <==
LIBSYSTEMD_209 {
global:
        sd_get_seats;
};

$ gcc -shared -o liba.so liba.c -Wl,--version-script=liba.sym
$ gcc -shared -fPIC libb.c -o libb.so -L. -la
/usr/bin/ld: BFD (GNU Binutils for Debian) 2.24 internal error, aborting at
../../bfd/elf64-x86-64.c line 3363 in elf_x86_64_relocate_section

/usr/bin/ld: Please report this bug.

collect2: error: ld returned 1 exit status
--------------------------------------------------

Running the same with -Wl,-fuse-ld=gold works fine.

[1]
https://www.mail-archive.com/address@hidden/msg16014.html

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