This is the mail archive of the mailing list for the newlib project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: mn10300 linker script update

Jeff Johnston wrote:
Jeff Law wrote:

Modern versions of the toolchain have added several new sections that need to appear in the linker script. Most notable are a few .bss sections for the C++ runtime. Failure to include these sections leads to memory corruption as the _end symbol incorrectly appears before the end of the .bss sections. Needless to say this causes a variety of fun and interesting problems as the C++ runtime clobbers the heap and vice-versa.

I resync'd all the mn103 libgloss linker scripts with the standard mn10300 linker script. I've tested the simulator linker script thoroughly, but since I don't have eval boards, I can't actually test the others.

Given I haven't contributed to this code in nearly a decade, I thought it best to wait for approval/feedback rather than just check in the changes :-)

OK to apply?

Yes, please go ahead. I assume there will be other neglected platforms that will also be missing this change.
Most likely. However, some don't have modern GCC toolchains so it's not a major problem (mn102 comes to mind) and others we traditionally haven't supported C++ (H8/300 IIRC). However, I will make an effort to update targets as I come across them in my testing.

Arguably at least some of these scripts could be integrated into ld's scheme for building scripts from the basic ELF templates since they usually just vary in a few addresses and the GROUP statements. But I'm not sure I want to try and tackle that yet.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]