This is the mail archive of the newlib@sourceware.org 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: [PATCH] [MSP430] Make the inclusion of run_*_array functions depend on defined assembler symbols


On Apr 18 01:04, Jozef Lawrynowicz wrote:
> Many of the MSP430 crt functions (e.g. to initialize bss) are linked
> "dynamically", based on symbols defined in the program.
> The GNU assembler defines the symbols corresponding to the crt
> functions by examining the section names in the input file.
> 
> If GCC has been configured with --enable-initfini-array, then
> .init_array and .fini_array will hold pointers to global
> constructors/destructors. These sections can also hold functions that
> need to be executed for other purposes.
> 
> The attached patch puts the __crt0_run_{preinit,init,fini}_array and
> __crt0_run_array functions in their own object files, so they will
> only be linked into the final executable when needed.
> 
> A companion patch for the GNU assembler has been submitted here:
> https://sourceware.org/ml/binutils/2019-04/msg00211.html
> 
> Successfully regtested the DejaGNU GCC testsuite using the binutils and newlib
> changes together with GCC trunk configured with --enable-initfini-array.
> 
> If the patch is acceptable, I would appreciate if someone would commit it for
> me, as I do not have write access.

Pushed.

Btw., you don't have to prepend text to your patch if it's reproducing
the commit message anyway.  Just send the patch with `git send-email'
to the list, patchsets ideally git format-patch'ed with --cover-letter.


Thanks,
Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
Red Hat

Attachment: signature.asc
Description: PGP signature


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