public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Re:  GNU ld on x86 Solaris
@ 1997-11-05 19:32 meissner
  1997-11-05 23:22 ` Fred Richardson
  1997-11-05 23:22 ` Fred Richardson
  0 siblings, 2 replies; 6+ messages in thread
From: meissner @ 1997-11-05 19:32 UTC (permalink / raw)
  To: egcs, frichard

| I've been tooling around with GNU ld to see if I can get it to work on
| x86 Solaris.  I thought this wouldn't be a problem since GNU ld seems
| to work fine on Sparc Solaris.  But I'm getting this message:
| 
|     ld.new: foo: Not enough room for program headers (allocated 5, need 6)
|     ld.new: final link failed: Bad value
| 
| Here's a complete dump of ld's verbose output.  Perhaps I shouldn't be
| using this version of BFD?  Any help would be appreciated:

A program header is describes a region of memory to the dynamic linker (IMHO
this is a wart in ELF, that there are two different ways of describing memory,
sections being the other).  In any case, for other ELF x86 systems, BFD
believes their will be five regions for programs that contain references to
shared libraries:

   1)	Program header region that contains the program headers themselves;

   2)	The interpreter region that points to the interpreter to invoke to
	start the program;

   3)	The read-only, execute enabled text section;

   4)	The read/write, execute disabled data section;

   5)	The data passed to the dynamic loader.

If BFD claims it needs 6 tables, then you have an extra section that must be
accounted for (such as r/w data in the middle of r/o data).

^ permalink raw reply	[flat|nested] 6+ messages in thread
* GNU ld on x86 Solaris
@ 1997-11-05 17:54 Fred Richardson
  1997-11-05 20:48 ` Ian Lance Taylor
  0 siblings, 1 reply; 6+ messages in thread
From: Fred Richardson @ 1997-11-05 17:54 UTC (permalink / raw)
  To: egcs

Hi-

I've been tooling around with GNU ld to see if I can get it to work on
x86 Solaris.  I thought this wouldn't be a problem since GNU ld seems
to work fine on Sparc Solaris.  But I'm getting this message:

    ld.new: foo: Not enough room for program headers (allocated 5, need 6)
    ld.new: final link failed: Bad value

Here's a complete dump of ld's verbose output.  Perhaps I shouldn't be
using this version of BFD?  Any help would be appreciated:
=============================================================================
GNU ld version cygnus-2.8.1 (with BFD linux-2.8.1.0.15)
  Supported emulations:
   elf_i386
GNU ld version cygnus-2.8.1 (with BFD linux-2.8.1.0.15)
  Supported emulations:
   elf_i386
using internal linker script:
==================================================
OUTPUT_FORMAT("elf32-i386", "elf32-i386",
	      "elf32-i386")
OUTPUT_ARCH(i386)
ENTRY(_start)
SEARCH_DIR(/lib); SEARCH_DIR(/usr/lib); SEARCH_DIR(/usr/ccs/lib); SEARCH_DIR(/d4mutl/contrib/egcs/lib); SEARCH_DIR(/usr/local/lib); SEARCH_DIR(/d4mutl/contrib/egcs/i386-pc-solaris2.5.1/lib);
/* Do we need any of these for elf?
   __DYNAMIC = 0;    */
SECTIONS
{
  /* Read-only sections, merged into text segment: */
  . = 0x08048000 + SIZEOF_HEADERS;
  .interp     : { *(.interp) 	}
  .hash          : { *(.hash)		}
  .dynsym        : { *(.dynsym)		}
  .dynstr        : { *(.dynstr)		}
  .gnu.version   : { *(.gnu.version)	}
  .gnu.version_d   : { *(.gnu.version_d)	}
  .gnu.version_r   : { *(.gnu.version_r)	}
  .rel.text      :
    { *(.rel.text) *(.rel.gnu.linkonce.t*) }
  .rela.text     :
    { *(.rela.text) *(.rela.gnu.linkonce.t*) }
  .rel.data      :
    { *(.rel.data) *(.rel.gnu.linkonce.d*) }
  .rela.data     :
    { *(.rela.data) *(.rela.gnu.linkonce.d*) }
  .rel.rodata    :
    { *(.rel.rodata) *(.rel.gnu.linkonce.r*) }
  .rela.rodata   :
    { *(.rela.rodata) *(.rela.gnu.linkonce.r*) }
  .rel.got       : { *(.rel.got)		}
  .rela.got      : { *(.rela.got)		}
  .rel.ctors     : { *(.rel.ctors)	}
  .rela.ctors    : { *(.rela.ctors)	}
  .rel.dtors     : { *(.rel.dtors)	}
  .rela.dtors    : { *(.rela.dtors)	}
  .rel.init      : { *(.rel.init)	}
  .rela.init     : { *(.rela.init)	}
  .rel.fini      : { *(.rel.fini)	}
  .rela.fini     : { *(.rela.fini)	}
  .rel.bss       : { *(.rel.bss)		}
  .rela.bss      : { *(.rela.bss)		}
  .rel.plt       : { *(.rel.plt)		}
  .rela.plt      : { *(.rela.plt)		}
  .init          : { *(.init)	} =0x9090
  .plt      : { *(.plt)	}
  .text      :
  {
    *(.text)
    *(.stub)
    /* .gnu.warning sections are handled specially by elf32.em.  */
    *(.gnu.warning)
    *(.gnu.linkonce.t*)
  } =0x9090
  _etext = .;
  PROVIDE (etext = .);
  .fini      : { *(.fini)    } =0x9090
  .rodata    : { *(.rodata) *(.gnu.linkonce.r*) }
  .rodata1   : { *(.rodata1) }
  /* Adjust the address for the data segment.  We want to adjust up to
     the same address within the page on the next page up.  */
  . = ALIGN(0x1000) + (. & (0x1000 - 1));
  .data    :
  {
    *(.data)
    *(.gnu.linkonce.d*)
    CONSTRUCTORS
  }
  .data1   : { *(.data1) }
  .ctors         :
  {
    *(.ctors)
  }
  .dtors         :
  {
    *(.dtors)
  }
  .got           : { *(.got.plt) *(.got) }
  .dynamic       : { *(.dynamic) }
  /* We want the small data sections together, so single-instruction offsets
     can access them all, and initialized data all before uninitialized, so
     we can shorten the on-disk segment size.  */
  .sdata     : { *(.sdata) }
  _edata  =  .;
  PROVIDE (edata = .);
  __bss_start = .;
  .sbss      : { *(.sbss) *(.scommon) }
  .bss       :
  {
   *(.dynbss)
   *(.bss)
   *(COMMON)
  }
  _end = . ;
  PROVIDE (end = .);
  /* Stabs debugging sections.  */
  .stab 0 : { *(.stab) }
  .stabstr 0 : { *(.stabstr) }
  .stab.excl 0 : { *(.stab.excl) }
  .stab.exclstr 0 : { *(.stab.exclstr) }
  .stab.index 0 : { *(.stab.index) }
  .stab.indexstr 0 : { *(.stab.indexstr) }
  .comment 0 : { *(.comment) }
  /* DWARF debug sections.
     Symbols in the DWARF debugging sections are relative to the beginning
     of the section so we begin them at 0.  */
  /* DWARF 1 */
  .debug          0 : { *(.debug) }
  .line           0 : { *(.line) }
  /* GNU DWARF 1 extensions */
  .debug_srcinfo  0 : { *(.debug_srcinfo) }
  .debug_sfnames  0 : { *(.debug_sfnames) }
  /* DWARF 1.1 and DWARF 2 */
  .debug_aranges  0 : { *(.debug_aranges) }
  .debug_pubnames 0 : { *(.debug_pubnames) }
  /* DWARF 2 */
  .debug_info     0 : { *(.debug_info) }
  .debug_abbrev   0 : { *(.debug_abbrev) }
  .debug_line     0 : { *(.debug_line) }
  .debug_frame    0 : { *(.debug_frame) }
  .debug_str      0 : { *(.debug_str) }
  .debug_loc      0 : { *(.debug_loc) }
  .debug_macinfo  0 : { *(.debug_macinfo) }
  /* SGI/MIPS DWARF 2 extensions */
  .debug_weaknames 0 : { *(.debug_weaknames) }
  .debug_funcnames 0 : { *(.debug_funcnames) }
  .debug_typenames 0 : { *(.debug_typenames) }
  .debug_varnames  0 : { *(.debug_varnames) }
  /* These must appear regardless of  .  */
}


==================================================
attempt to open /d4mutl/contrib/egcs/lib/gcc-lib/i386-pc-solaris2.5.1/egcs-2.90.15/crt1.o succeeded
/d4mutl/contrib/egcs/lib/gcc-lib/i386-pc-solaris2.5.1/egcs-2.90.15/crt1.o
attempt to open /d4mutl/contrib/egcs/lib/gcc-lib/i386-pc-solaris2.5.1/egcs-2.90.15/crti.o succeeded
/d4mutl/contrib/egcs/lib/gcc-lib/i386-pc-solaris2.5.1/egcs-2.90.15/crti.o
attempt to open /usr/ccs/lib/values-Xa.o succeeded
/usr/ccs/lib/values-Xa.o
attempt to open /d4mutl/contrib/egcs/lib/gcc-lib/i386-pc-solaris2.5.1/egcs-2.90.15/crtbegin.o succeeded
/d4mutl/contrib/egcs/lib/gcc-lib/i386-pc-solaris2.5.1/egcs-2.90.15/crtbegin.o
attempt to open foo.o succeeded
foo.o
attempt to open /d4mutl/contrib/egcs/lib/gcc-lib/i386-pc-solaris2.5.1/egcs-2.90.15/libstdc++.so failed
attempt to open /d4mutl/contrib/egcs/lib/gcc-lib/i386-pc-solaris2.5.1/egcs-2.90.15/libstdc++.a failed
attempt to open /d4mutl/contrib/egcs/i386-pc-solaris2.5.1/lib/libstdc++.so failed
attempt to open /d4mutl/contrib/egcs/i386-pc-solaris2.5.1/lib/libstdc++.a failed
attempt to open /usr/ccs/bin/libstdc++.so failed
attempt to open /usr/ccs/bin/libstdc++.a failed
attempt to open /usr/ccs/lib/libstdc++.so failed
attempt to open /usr/ccs/lib/libstdc++.a failed
attempt to open /d4mutl/contrib/egcs/lib/libstdc++.so succeeded
-lstdc++ (/d4mutl/contrib/egcs/lib/libstdc++.so)
attempt to open /d4mutl/contrib/egcs/lib/gcc-lib/i386-pc-solaris2.5.1/egcs-2.90.15/libgcc.so failed
attempt to open /d4mutl/contrib/egcs/lib/gcc-lib/i386-pc-solaris2.5.1/egcs-2.90.15/libgcc.a succeeded
attempt to open /d4mutl/contrib/egcs/lib/gcc-lib/i386-pc-solaris2.5.1/egcs-2.90.15/libc.so failed
attempt to open /d4mutl/contrib/egcs/lib/gcc-lib/i386-pc-solaris2.5.1/egcs-2.90.15/libc.a failed
attempt to open /d4mutl/contrib/egcs/i386-pc-solaris2.5.1/lib/libc.so failed
attempt to open /d4mutl/contrib/egcs/i386-pc-solaris2.5.1/lib/libc.a failed
attempt to open /usr/ccs/bin/libc.so failed
attempt to open /usr/ccs/bin/libc.a failed
attempt to open /usr/ccs/lib/libc.so failed
attempt to open /usr/ccs/lib/libc.a failed
attempt to open /d4mutl/contrib/egcs/lib/libc.so failed
attempt to open /d4mutl/contrib/egcs/lib/libc.a failed
attempt to open /usr/ccs/lib/libc.so failed
attempt to open /usr/ccs/lib/libc.a failed
attempt to open /usr/lib/libc.so succeeded
-lc (/usr/lib/libc.so)
attempt to open /d4mutl/contrib/egcs/lib/gcc-lib/i386-pc-solaris2.5.1/egcs-2.90.15/libgcc.so failed
attempt to open /d4mutl/contrib/egcs/lib/gcc-lib/i386-pc-solaris2.5.1/egcs-2.90.15/libgcc.a succeeded
attempt to open /d4mutl/contrib/egcs/lib/gcc-lib/i386-pc-solaris2.5.1/egcs-2.90.15/crtend.o succeeded
/d4mutl/contrib/egcs/lib/gcc-lib/i386-pc-solaris2.5.1/egcs-2.90.15/crtend.o
attempt to open /d4mutl/contrib/egcs/lib/gcc-lib/i386-pc-solaris2.5.1/egcs-2.90.15/crtn.o succeeded
/d4mutl/contrib/egcs/lib/gcc-lib/i386-pc-solaris2.5.1/egcs-2.90.15/crtn.o
ld.new: foo: Not enough room for program headers (allocated 5, need 6)
ld.new: final link failed: Bad value

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~1997-11-06 15:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-11-05 19:32 GNU ld on x86 Solaris meissner
1997-11-05 23:22 ` Fred Richardson
1997-11-05 23:22 ` Fred Richardson
1997-11-06 15:17   ` Michael Meissner
  -- strict thread matches above, loose matches on Subject: below --
1997-11-05 17:54 Fred Richardson
1997-11-05 20:48 ` Ian Lance Taylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).