Re: [PATCH] [MSP430] Make the inclusion of run_*_array functions depend on defined assembler symbols
Corinna Vinschen <[email protected]>
| Newsgroups | gmane.comp.lib.newlib |
|---|---|
| Message-ID | <[email protected]> |
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
signature.asc
(application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEoVYPmneWZnwT6kwF9TYGna5ET6AFAly4NnQACgkQ9TYGna5E T6AEDw//fWq/AiyxSIY3sMu2pWfPC9pKLupK0MF38wDq9QsuuNAbVyDmUwD4ysDh UPGNRD56vPhrI5TWy+NZ5loFAByhkYUpMf1EEsLSPDQzNIS/Hvhi5GGgqbgyQjHs 6G7LgRwaEjYhp76Y+xF6JYZbHTsL94JbXAe19ke5C+Avl5XStVkIGrEnR3HCwN4I cN9/kAt0sf8h6C2A4CP1uq21Vjzj6fKB0oHVyjF4CfkZEVQoHgVfojRlUIG5meQi kCFOepAZ83+XyQ5i0viPCY8yVIqUzBl6SBfggbue76iTK0VVoJnXj2EWL+S3rUur jlZ5512xOwzOzks86ww/bVuSUh0uTfHOyE9ER5fM7s7vQcS7zPkN04kypNmiJgER 9GT6HIX6R8N3GpPmx4x20TZ9dAEnGmXjAwfld1s70oycnRJ+HoMQxL5AqQEWn+nF 4E3sTv6LwLUlmXGudl7oO1sO9p8G/EbdqBD0zYVVr465XUI2Nn2B5iseWCLGMp/2 FOp1uOpETSfiPSZb+5IKEsvGzm7kV38dv4HTkh4syNPkRYmC5LIBjdAp+i+FuWcu S5xdAW2raSR+JiakhHnvpFaUCnGLkvuBEsVqQlZR+ATZVDuCcfQ4jv7dKwpQEQzu 0qi0xo4nhZMAn3RfxNy/uUWREgk0VIqcB5cK13KqCtP4AY9K9Qc= =bt2m -----END PGP SIGNATURE-----