From: Michael Cree <mcree@orcon.net.nz>
To: carl hansen <carlhansen1234@gmail.com>
Cc: debian-alpha@lists.debian.org, linux-alpha@vger.kernel.org
Subject: Re: problem compiling kernel ld error relocation truncated to fit: GPREL16 against symbol
Date: Sun, 13 Nov 2011 13:43:30 +1300 [thread overview]
Message-ID: <4EBF12B2.1070504@orcon.net.nz> (raw)
In-Reply-To: <CAHEkXCQ5HeiSmSkFSh5bLvo-VO225bKugDXYVFp34-zbb3uriA@mail.gmail.com>
[Added linux-alpha to CC to increase likelihood of reaching someone who
best knows about this issue.]
On 03/11/11 15:54, carl hansen wrote:
> Problem compiling kernel 3.1, gcc 4.6.1 or .2, latest binutils
>
> I think it's ld error
> google suggested -Wl,--no-relax, didn't make a difference, unless I
> did it wrong
The binutils bug that can be worked around with --no-relax is not the
issue here.
> ld -static -N --build-id -o .tmp_vmlinux1 -T
> arch/alpha/kernel/vmlinux.lds arch/alpha/kernel/head.o
> init/built-in.o --start-group usr/built-in.o
> arch/alpha/kernel/built-in.o arch/alpha/mm/built-in.o
> arch/alpha/math-emu/built-in.o kernel/built-in.o mm/built-in.o
> fs/built-in.o ipc/built-in.o security/built-in.o crypto/built-in.o
> block/built-in.o lib/lib.a arch/alpha/lib/lib.a lib/built-in.o
> arch/alpha/lib/built-in.o drivers/built-in.o sound/built-in.o
> firmware/built-in.o net/built-in.o --end-group
> init/built-in.o: In function `do_one_initcall':
> /var/src.build/kernelbuild/latest/linux-3.1/init/main.c:682:(.text+0x8):
> relocation truncated to fit: GPREL16 against symbol `initcall_debug'
> defined in .sbss section in init/built-in.o
Confirmed. Building kernel 3.1 with config for Miata and mainly only
drivers needed for that hardware compiles fine with gcc-4.4 but fails
with the GPREL16 link errors when compiled with gcc-4.6.
If I modify arch/kernel/Makefile to add -mlarge-data rather than
-msmall-data to CFLAGS then the kernel successfully compiles with gcc-4.6.
Is there anyone more knowledgeable than I about gcc who can give us
guidance as to why gcc-4.6 should be enlarging the data segment so much
that the small data model cannot be used? Or is there a fix required in
the kernel code?
Cheers
Michael.
next parent reply other threads:[~2011-11-13 0:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAHEkXCQ5HeiSmSkFSh5bLvo-VO225bKugDXYVFp34-zbb3uriA@mail.gmail.com>
2011-11-13 0:43 ` Michael Cree [this message]
2011-12-06 16:46 ` problem compiling kernel ld error relocation truncated to fit: GPREL16 against symbol Raúl Porcel
2011-12-06 18:55 ` Uros Bizjak
2011-12-06 22:27 ` Michael Cree
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=4EBF12B2.1070504@orcon.net.nz \
--to=mcree@orcon.net.nz \
--cc=carlhansen1234@gmail.com \
--cc=debian-alpha@lists.debian.org \
--cc=linux-alpha@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.