D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 19622 - rt.section_elf_shared: Support shared libraries on MIPS and RISCV
Summary: rt.section_elf_shared: Support shared libraries on MIPS and RISCV
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: druntime (show other issues)
Version: D2
Hardware: Other Linux
: P1 major
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-01-26 20:19 UTC by Iain Buclaw
Modified: 2021-03-21 09:27 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Iain Buclaw 2019-01-26 20:19:35 UTC
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 Iain Buclaw 2019-01-27 01:45:03 UTC
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.
Comment 2 Iain Buclaw 2021-03-21 09:27:38 UTC
Fixed in https://github.com/dlang/druntime/pull/3353