public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
From: "David Mosberger-Tang" <dmosberger@gmail.com>
To: linux-ia64@vger.kernel.org
Subject: need NOTES in vmlinux.lds.S
Date: Thu, 09 Aug 2007 06:30:09 +0000	[thread overview]
Message-ID: <ed5aea430708082330o7277cb2el89c7b89f120c9643@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 744 bytes --]

Without the attached patch, the current GIT trees fail to build for me
with error:

 ld: .tmp_vmlinux1: section `.text' can't be allocated in segment 0
 ld: final link failed: Bad value

This is with binutils v2.17.50.20070804 and is apparently due to the
recent --build-id changes (see
http://www.uwsg.indiana.edu/hypermail/linux/kernel/0707.2/3490.html).

I may not have picked the best possible place to stick the NOTES macro
(according to Roland, it should only be a few read-only bytes that are
hardly ever read), but at least the kernel builds again and it even
seems to boot (on my zx2000, anyhow). ;-)

Thanks to HJ Lu for his help in tracking down this bug.

  --david
--
Mosberger Consulting LLC, http://www.mosberger-consulting.com/

[-- Attachment #2: notes.diff --]
[-- Type: text/plain, Size: 965 bytes --]

[IA64] Add NOTES to linker script such that the kernel can be built with
       recent versions of binutils.  Without this patch, final link fails
       with this error:

        ld: .tmp_vmlinux1: section `.text' can't be allocated in segment 0
        ld: final link failed: Bad value

       This error is due to the fact that the --build-id option is used
       with newer linkers to include a .notes section on the kernel, but
       without the NOTES macro, that section won't be included in the kernel
       which then leads to the above error message.

Signed-off-by: David Mosberger-Tang <dmosberger@gmail.com>

diff --git a/arch/ia64/kernel/vmlinux.lds.S b/arch/ia64/kernel/vmlinux.lds.S
index 83e8067..71eb550 100644
--- a/arch/ia64/kernel/vmlinux.lds.S
+++ b/arch/ia64/kernel/vmlinux.lds.S
@@ -62,6 +62,8 @@ SECTIONS
 
   /* Read-only data */
 
+  NOTES
+
   /* Exception table */
   . = ALIGN(16);
   __ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET)

             reply	other threads:[~2007-08-09  6:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-09  6:30 David Mosberger-Tang [this message]
2007-08-09  6:44 ` need NOTES in vmlinux.lds.S Roland McGrath
2007-08-09 17:53 ` David Mosberger-Tang
2007-08-09 18:04 ` Luck, Tony
2007-08-09 18:52 ` Thomas Gleixner

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=ed5aea430708082330o7277cb2el89c7b89f120c9643@mail.gmail.com \
    --to=dmosberger@gmail.com \
    --cc=linux-ia64@vger.kernel.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