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

Fangrui Song <i at maskray dot me> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |i at maskray dot me

--- Comment #4 from Fangrui Song <i at maskray dot me> ---
With the latest change, call local@plt doesn't generate a relocation when the
symbol is a local symbol in the same section. However, movq $local@PLT, %rax
generates a relocation, which is redundant.


% cat g.s
movq $local@PLT, %rax
call local@plt

movq $.data@PLT, %rax
call .data@plt

local:

.data

% ~/Dev/binutils-gdb/out/debug/gas/as-new g.s -o g.o
% objdump -dr g.o

g.o:     file format elf64-x86-64


Disassembly of section .text:

0000000000000000 <local-0x18>:
   0:   48 c7 c0 00 00 00 00    mov    $0x0,%rax
                        3: R_X86_64_PLT32       local
   7:   e8 0c 00 00 00          call   18 <local>
   c:   48 c7 c0 00 00 00 00    mov    $0x0,%rax
                        f: R_X86_64_PLT32       .data
  13:   e8 00 00 00 00          call   18 <local>
                        14: R_X86_64_PC32       .data-0x4

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

Reply via email to