[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/27652] New: OpenRISC: PLT got offset overflow in big binaries
From: |
shorne at sourceware dot org |
Subject: |
[Bug ld/27652] New: OpenRISC: PLT got offset overflow in big binaries |
Date: |
Fri, 26 Mar 2021 00:27:13 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=27652
Bug ID: 27652
Summary: OpenRISC: PLT got offset overflow in big binaries
Product: binutils
Version: 2.35.2
Status: NEW
Severity: normal
Priority: P2
Component: ld
Assignee: unassigned at sourceware dot org
Reporter: shorne at sourceware dot org
Target Milestone: ---
As discussed in Bug 21464
When creating the PLT in or1k_elf_finish_dynamic_symbol the plt_reloc address
may have a 16-bit overflow in the l.ori instruction the overflow is not
checked, and creates binaries that will crash during runtime symbol lookup.
This was found via a glibc test failure:
FAIL: nptl/tst-audit-threads - works with LD_BIND_NOW=1, fails because PLT is
too large and overruns instruction 16-bit immediate.
.plt
75e70: 19 80 00 0b l.movhi r12,0xb
75e74: 85 8c 95 64 l.lwz r12,-27292(r12)
75e78: 44 00 60 00 l.jr r12
75e7c: a9 60 ff f0 l.ori r11,r0,0xfff0
75e80: 19 80 00 0b l.movhi r12,0xb
75e84: 85 8c 95 68 l.lwz r12,-27288(r12)
75e88: 44 00 60 00 l.jr r12
75e8c: a9 60 ff fc l.ori r11,r0,0xfffc
75e90: 19 80 00 0b l.movhi r12,0xb
75e94: 85 8c 95 6c l.lwz r12,-27284(r12)
75e98: 44 00 60 00 l.jr r12
75e9c: a9 61 00 08 l.ori r11,r1,0x8 < r0 changed to r1 from
overflow
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug ld/27652] New: OpenRISC: PLT got offset overflow in big binaries,
shorne at sourceware dot org <=