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: Fix for PR 12537


On Sat, Oct 18, 2003 at 12:17:28AM -0700, Geoff Keating wrote:
> Looking at the patch, it seems very odd.

I assume you mean the code that's there is odd rather than the patch
that #ifdefs out the odd code..

>  Why is this code there in
> the first place?  The relocs required when using .fixup are the same
> that ld.so needs to do.

Hmm.
2001-08-12  Richard Henderson  <rth@redhat.com>

	* config/rs6000/rs6000.c (rs6000_elf_section_type_flags): Fix
	thinko wrt TARGET_RELOCATABLE.
http://gcc.gnu.org/ml/gcc-regression/2001-08/msg00092.html

So I think we can blame Richard for making rw text sections. :-)

gcc-2.95 had
#define ASM_OUTPUT_SECTION_NAME(FILE, DECL, NAME, RELOC)                \
[snip]
  if (DECL && TREE_CODE (DECL) == FUNCTION_DECL)                        \
    type = SECT_EXEC, mode = "ax";                                      \
  else if (DECL && DECL_READONLY_SECTION (DECL, RELOC) && !TARGET_RELOCATABLE && !flag_pic) \
    type = SECT_RO, mode = "a";                                         \
  else                                                                  \
    type = SECT_RW, mode = "aw";                                        \

and that I assume comes from
Tue Aug 20 18:49:55 1996  Michael Meissner  <meissner@tiktok.cygnus.com>

	* rs6000/sysv4.h (ASM_OUTPUT_SECTION_NAME): If -mrelocatable or
	-mrelocatable-lib, don't make read-only sections.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


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