Bug 19622 – rt.section_elf_shared: Support shared libraries on MIPS and RISCV
Status
RESOLVED
Resolution
FIXED
Severity
major
Priority
P1
Component
druntime
Product
D
Version
D2
Platform
Other
OS
Linux
Creation time
2019-01-26T20:19:35Z
Last change time
2021-03-21T09:27:38Z
Assigned to
No Owner
Creator
Iain Buclaw
Comments
Comment #0 by ibuclaw — 2019-01-26T20:19:35Z
Both targets #define DL_RO_DYN_SECTION 1, which means that glibc won't adjust .dynamic section on start-up.
We must do it ourselves in section_elf_shared, see the version paths for OpenBSD and NetBSD for how.
---
strtab = cast(const(char)*)(info.dlpi_addr + dyn.d_un.d_ptr);
---
Comment #1 by ibuclaw — 2019-01-27T01:45:03Z
Confirmed RISCV works, however the SiFive developers think that this behaviour was accidentally copied from MIPS, rather than something that is part of the documented ABI.
Until I hear back, that means there's at least one target that definitely requires special handling.