This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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] SH : Add target specific option -msort-data for SH-ELFtarget


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


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