bug-binutils
[Top][All Lists]
Advanced

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

[Bug gas/28157] gas: .symver *, *@*, remove cannot be used in relocation


From: hjl.tools at gmail dot com
Subject: [Bug gas/28157] gas: .symver *, *@*, remove cannot be used in relocation
Date: Sat, 07 Aug 2021 13:02:23 +0000

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

--- Comment #4 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Fangrui Song from comment #2)
> (In reply to H.J. Lu from comment #1)
> > Created attachment 13571 [details]
> > A patch
> > 
> > Please try this.
> 
> I applied this patch.
> 
> % cat /tmp/c/y.s
> call __free_hook
> .symver __free_hook, __free_hook@GLIBC.2.2.5, remove
> # for an undefined symbol, I believe `remove` is a no-op.
> 
> % gas/as-new /tmp/c/y.s -o y.o
> /tmp/c/y.s: Assembler messages:
> /tmp/c/y.s: Internal error (Segmentation fault).
> Please report this bug.

Works for me:

[hjl@gnu-cfl-2 pr28157]$ cat foo.s
        call __free_hook
        .symver __free_hook, __free_hook@GLIBC.2.2.5, remove
[hjl@gnu-cfl-2 pr28157]$ ./as foo.s -o foo.o
[hjl@gnu-cfl-2 pr28157]$ objdump -dwr foo.o

foo.o:     file format elf64-x86-64


Disassembly of section .text:

0000000000000000 <.text>:
   0:   e8 00 00 00 00          call   0x5      1: R_X86_64_PLT32      
__free_hook@GLIBC.2.2.5-0x4
[hjl@gnu-cfl-2 pr28157]$ nm foo.o
                 U __free_hook@GLIBC.2.2.5
[hjl@gnu-cfl-2 pr28157]$

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