public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Fred Fish <fnf@specifix.com>
Cc: "H. J. Lu" <hjl@lucon.org>, binutils@sourceware.org
Subject: Re: [PATCH] Create ".dynamic" section earlier
Date: Fri, 09 Jun 2006 19:16:00 -0000	[thread overview]
Message-ID: <20060609182807.GB4174@nevyn.them.org> (raw)
In-Reply-To: <200606091140.09648.fnf@specifix.com>

On Fri, Jun 09, 2006 at 11:40:09AM -0400, Fred Fish wrote:
> $ mips-elf-gcc -shared -o main main.c -Tidt.ld
> /links/opt-local/latest/trunk/bin/../lib/gcc/mips-elf/4.2.0/../../../../mips-elf/bin/ld: main: The first section in the PT_DYNAMIC segment is not the .dynamic section
> /links/opt-local/latest/trunk/bin/../lib/gcc/mips-elf/4.2.0/../../../../mips-elf/bin/ld: final link failed: Bad value
> collect2: ld returned 1 exit status

This problem, of course, only arises because the .dynamic section is
not in your linker script.  If you were using the standard linker
scripts generated by the ld build process, it would probably work.

The problem is that the parameter file for mips-elf has
GENERATE_SHLIB_SCRIPT=yes, so -shared is allowed by the linker, but
you're using a handwritten (from libgloss) linker script that doesn't. 
So orphan placement is kicking in.

-- 
Daniel Jacobowitz
CodeSourcery

      parent reply	other threads:[~2006-06-09 18:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-09 14:43 Fred Fish
2006-06-09 15:38 ` H. J. Lu
2006-06-09 15:46   ` Fred Fish
2006-06-09 16:53     ` H. J. Lu
2006-06-09 17:08       ` Fred Fish
2006-06-09 19:16     ` Daniel Jacobowitz [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060609182807.GB4174@nevyn.them.org \
    --to=drow@false.org \
    --cc=binutils@sourceware.org \
    --cc=fnf@specifix.com \
    --cc=hjl@lucon.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).