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] Fix -fPIC on ppc-*-linux*


On Wed, Jan 29, 2003 at 02:21:08PM +0100, Jakub Jelinek wrote:
> +/* We don't need to generate entries in .fixup.  */
> +#undef RELOCATABLE_NEEDS_FIXUP

After the message from Franz, I think this part is ok.
I'd really rather we didn't treat -fPIC == -mrelocatable,
but that's probably a reasonalble amount of overhaul.

>      = default_section_type_flags_1 (decl, name, reloc,
>  				    flag_pic || DEFAULT_ABI == ABI_AIX);
>  
> +#ifdef RELOCATABLE_NEEDS_FIXUP
>    if (TARGET_RELOCATABLE)
>      flags |= SECTION_WRITE;
> +#endif

Here I think it's better we do

	  bool rw_relocs = flag_pic || DEFAULT_ABI == ABI_AIX;
	#ifdef RELOCATABLE_NEEDS_FIXUP
	  if (TARGET_RELOCATABLE)
	    rw_relocs = 1;
	#endif
	  ... = default_section_type_flags_1 (decl, name, reloc, rw_relocs);

I expect you'd have to modify several of the other section
manipulation hooks as well.


r~


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