[PATCH] H8: Add support for preinit/init/fini array

Jan Dubiec jdx@o2.pl
Sat Aug 15 07:55:39 GMT 2026


On 12.08.2026 04:53, Hans-Peter Nilsson wrote:
[...]

> The parts of this patch to the generic files, should be reverted.
> Instead I suggest to correct binutils for h8300 to emit the "_" as a
> prefix to those linker-generated initfini-symbols in the default
> linker scripts, something like:
Thanks for pointing this out. It led to the discovery of an 
inconsistency in the H8 toolchain. I had actually considered 
USER_LABEL_PREFIX earlier, but was misled by gcc, which defines this 
macro: 
https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/config/h8300/elf.h;hb=HEAD

I have already posted a patch for binutils: 
https://sourceware.org/pipermail/binutils/2026-August/150796.html

/J.D.



More information about the Newlib mailing list