This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Re: PATCH for elf.sc
- To: Ian Lance Taylor <ian@zembu.com>
- Subject: Re: PATCH for elf.sc
- From: Jeffrey A Law <law@cygnus.com>
- Date: Sun, 20 Jun 1999 22:05:36 -0600
- cc: mark@codesourcery.com, binutils@sourceware.cygnus.com
- Reply-To: law@cygnus.com
In message <19990621034739.8502.qmail@daffy.airs.com>you write:
> On IRIX6, the .rodata section often has to be writable. (Yes, you
> read that right.) That's because there are .rel.dyn relocations
> against it, and because SGI `rld' does not honor DT_TEXTREL. (That's
> supposed to tell it that relocations may occur against the text
> segment.) The consequence is that .rodata must go in the data
> segment. Here's a patch to elf.sc that allows a port to turn on this
> behavior.
>
> That's odd. For most targets, -fpic will arrange to put read only
> constants that require relocation into .data rather than .rodata. For
> example, that's what the reloc parameter is for in
> output_constant_def_contents in gcc/varasm.c. Maybe the problem is
> that gcc isn't setting flag_pic for Irix 6 even though it is really
> compiling in PIC mode.
I agree that we need to look at the compiler. This is a common issue (and
a relatively common bug with the target files). Nothing should be going into
.rodata that needs a runtime relocation.
jeff