-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Toolchain update #420
base: master
Are you sure you want to change the base?
Toolchain update #420
Conversation
- binutils 2.42 - GCC 14.1.0 - newlib 4.4.0 - GDB 14.2
The The more concerning issue is that after fixing the above issue, the The new version of ld gives a warning about a "LOAD segment with RWX permissions," this can be suppressed with nSDL seems to work fine for me without |
What actually pulls in the randomness functions? The program doesn't use std::random_device directly, but somehow ends up needing it.
The init_array content was in a separate section not handled by the linker script and startup code. Should be fixed.
Hm, maybe we should try to make .text separate from data: diff --git a/ndless-sdk/system/ldscript b/ndless-sdk/system/ldscript
index 5ff03eb..8c7a3bf 100644
--- a/ndless-sdk/system/ldscript
+++ b/ndless-sdk/system/ldscript
@@ -1,5 +1,10 @@
ENTRY(_start)
+PHDRS {
+ text PT_LOAD;
+ data PT_LOAD;
+}
+
SECTIONS {
.text 0x0 : {
_start = .;
@@ -10,13 +15,13 @@ SECTIONS {
KEEP(*(.fini_array))
KEEP(*(SORT_BY_INIT_PRIORITY(.fini_array.*)))
*(.text.*)
- }
+ } :text
.got : {
*(.got.plt*)
*(.got)
LONG(0xFFFFFFFF)
- }
+ } :data
.data : {
*(.rodata*) genzehn doesn't care about segments so it's pretty much a noop though. |
This, apparently.
Yes, that fixes it. |
That looks like the other way around: It's pulled in if old (pre-C++11) |
Nope, you're correct - I missed that Maybe building libstdc++ with |
No, doesn't. Probably because of the static constructor which ends up in the .elf before sections get GC'd. |
I played around with the newlib-c++ bloat a bit and I don't think there's much we can effectively do. Even avoiding the random stuff by force only gets rid of ~20K which isn't really worth it. |
* Add support to the linker script and startup code. * Add tests for init_priority to the zehn sample
Avoids the creation of RWX segments which newer binutils warns about.
I think SDL_image has to be rebuilt. |
Might need nSDL rebuilt, could also drop
--enable-newlib-reent-binary-compat
then.For some reason, the
newlib-c++
sample pulls in arc4random which requires_getentropy
and is massive. Needs investigation why.