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


Hi Zack,

Thank you for your comments.
It would be really useful if this is done target independent.

As far as my knowledge is concerned, it requires change in
"gcc/varasm.c". 

How to relate this feature with "-Os" option so as not to enable it by
default ?

Kindly guide me on how to write this patch so that it will be target
independent.

Regards,
Anil Paranjpe 

-----Original Message-----
From: Zack Weinberg [mailto:zack@codesourcery.com] 
Sent: Wednesday, June 22, 2005 7:40 PM
To: Anil Paranjape
Cc: Richard Sandiford; gcc-patches@gcc.gnu.org
Subject: 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]