-
-
Notifications
You must be signed in to change notification settings - Fork 421
[stable] rt.sections_elf_shared: Upstream MIPS/RISC-V fix wrt. .so dependency names from GDC #3353
Conversation
|
Thanks for your pull request and interest in making D better, @kinke! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please see CONTRIBUTING.md for more information. If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment. Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub run digger -- build "stable + druntime#3353" |
| version (CRuntime_Musl) | ||
| strtab = cast(const(char)*)(object.baseAddress + dyn.d_un.d_ptr); // relocate | ||
| enum relocate = true; | ||
| else version (linux) | ||
| strtab = cast(const(char)*)dyn.d_un.d_ptr; | ||
| { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be CRuntime_Glibc then, instead of "linux" ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not keen on looking up CRuntime_UClibc etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At least the MIPS part seems to apply to uclibc too: https://cgit.uclibc-ng.org/cgi/cgit/uclibc-ng.git/tree/ldso/include/ldsodefs.h#n12
@ibuclaw: Do you know if there'd be a more robust way to detect this? Like checking the PF_W flag of the PT_DYNAMIC program header?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an internal detail, so no I don't think so. It did come up when the RISCV developers implemented this in gdc because it seems to have been a mistake to copy MIPS, I guess we'll just have to address that hurdle when we get to it.
|
Forgot that I raised a bug report about it years ago. |
See https://github.com/gcc-mirror/gcc/blob/25f303e9a27a0d799f9979446d9f11ed62b8d648/libphobos/libdruntime/gcc/sections/elf_shared.d#L760-L772. It's also relevant for LDC.