[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/13302] IRELATIVE relocation should come last
From: |
nelsonc1225 at sourceware dot org |
Subject: |
[Bug binutils/13302] IRELATIVE relocation should come last |
Date: |
Tue, 21 Feb 2023 08:33:32 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=13302
Nelson Chu <nelsonc1225 at sourceware dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |nelsonc1225 at sourceware dot
org
--- Comment #11 from Nelson Chu <nelsonc1225 at sourceware dot org> ---
For riscv, in the allocate_dynrelocs, all STT_GNU_IFUNC will be handled until
allocate_ifunc_dynrelocs and allocate_local_ifunc_dynrelocs, so the offset of
plt and got entries for ifunc symbols should be at last. Besides, in the
finish_dynamic_symbol, riscv inserts the dynamic relocations in the order of
plt and got entry offset. Therefore, all the dynamic relocations of ifunc
should be come last in the dynamic sections.
I think the only potential risk is - if dynamic relocation of ifunc won't be
IRELATIVE, it's JUMP_SLOT/32/64 relocs, then once ifunc may calls another
ifunc, it is only possible for riscv to meet the order problem here. If that
so, then arm's solution cannot work for riscv since IRELATIVE not only added
into rel.dyn, they can be added into rel.plt, rel.got, ... just like what x86
did. Therefore, similar to x86, riscv also needs flags to insert the IRELATIVE
at the last the dynamic relocation sections in the finish_dynamic_symbol, and
probably needs more since not only rel.plt are used.
--
You are receiving this mail because:
You are on the CC list for the bug.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug binutils/13302] IRELATIVE relocation should come last,
nelsonc1225 at sourceware dot org <=