Bug 1624776 - binutils: ld removes some R_X86_64_JUMP_SLOT relocations
Summary: binutils: ld removes some R_X86_64_JUMP_SLOT relocations
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: binutils
Version: 7.5
Hardware: x86_64
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: Nick Clifton
QA Contact: Miloš Prchlík
URL:
Whiteboard:
Depends On:
Blocks: 1655768
TreeView+ depends on / blocked
 
Reported: 2018-09-03 09:23 UTC by Florian Weimer
Modified: 2019-08-06 12:41 UTC (History)
5 users (show)

Fixed In Version: binutils-2.27-38.base.el7
Doc Type: No Doc Update
Doc Text:
undefined
Clone Of:
Environment:
Last Closed: 2019-08-06 12:41:33 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1624779 1 None None None 2021-01-20 06:05:38 UTC
Red Hat Product Errata RHSA-2019:2075 0 None None None 2019-08-06 12:41:48 UTC

Internal Links: 1624779

Description Florian Weimer 2018-09-03 09:23:47 UTC
Consider this assembler source file (reloc.s):

	.text
	mov malloc@GOTPCREL(%rip), %rax
	jmp malloc@plt

Assemble and link it into a shared object:

as -o reloc.o reloc.s
ld -o reloc.so -shared reloc.o

binutils-2.23.52.0.1-16.el7.x86_64 generates these relocations:

Relocation section '.rela.dyn' at offset 0x200 contains 1 entries:
    Offset             Info             Type               Symbol's Value  Symbol's Name + Addend
0000000000200ff8  0000000200000006 R_X86_64_GLOB_DAT      0000000000000000 malloc + 0

Relocation section '.rela.plt' at offset 0x218 contains 1 entries:
    Offset             Info             Type               Symbol's Value  Symbol's Name + Addend
0000000000201018  0000000200000007 R_X86_64_JUMP_SLOT     0000000000000000 malloc + 0

But binutils-2.27-27.base.el7.x86_64 generates these relocations:

Relocation section '.rela.dyn' at offset 0x1e0 contains 1 entries:
    Offset             Info             Type               Symbol's Value  Symbol's Name + Addend
0000000000200ff8  0000000100000006 R_X86_64_GLOB_DAT      0000000000000000 malloc + 0

This is a regression because it prevents PLT enter/exit hooks from working for malloc@plt.

Comment 1 Florian Weimer 2018-09-03 09:26:17 UTC
I forgot to mention that this issue does not seem to be present in binutils-2.31.1-12.fc30.x86_64.

Comment 5 Nick Clifton 2019-01-08 16:44:01 UTC
Fixed in binutils-2.27-38.base.el7

Comment 9 errata-xmlrpc 2019-08-06 12:41:33 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2019:2075


Note You need to log in before you can comment on or make changes to this bug.