This is the mail archive of the binutils@sourceware.cygnus.com mailing list for the binutils project.


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

Re: PATCH for elf.sc



  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



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