This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch] SH : Add target specific option -msort-data for SH-ELFtarget
- From: Zack Weinberg <zack at codesourcery dot com>
- To: Anil Paranjape <AnilP1 at KPITCummins dot com>
- Cc: Richard Sandiford <richard at codesourcery dot com>, gcc-patches at gcc dot gnu dot org
- Date: Wed, 22 Jun 2005 07:10:27 -0700
- Subject: Re: [Patch] SH : Add target specific option -msort-data for SH-ELFtarget
- References: <4A1BE23A7B777442B60F4B4916AE0F130629DC8D@sohm.kpit.com>
Anil Paranjape wrote:
> Hi Richard,
>
> Thank you for your valuable suggestions.
> We have implemented your suggestions and modified the patch accordingly.
> Now, as you have said, no modification in linker script is required.
> Any existing linker script that use "*(.data*)" and "*(.rodata*)" will
> suffice.
Why is this coded as a SH-specific patch? It would be useful on any target.
I could argue for enabling it as part of -Os, even. (One wouldn't want to do
it by default, as this layout might not be maximally speed-efficient.)
> +def_sel:
> +#if __ELF__
> + default_elf_select_section (decl, reloc, align);
> +#else
> + default_select_section (decl, reloc, align);
> +#endif
Never do this. __ELF__ is a property of the host, not the target.
zw