public inbox for linux-parisc@vger.kernel.org
 help / color / mirror / Atom feed
From: Rolf Eike Beer <eike-kernel@sf-tec.de>
To: linux-parisc <linux-parisc@vger.kernel.org>
Subject: Re: Error compiling 3.9.0
Date: Tue, 30 Apr 2013 18:40:17 +0200	[thread overview]
Message-ID: <1428267.TfdjUgcdcj@eto> (raw)
In-Reply-To: <517FD922.6060408@bell.net>

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

Am Dienstag 30 April 2013, 10:45:54 schrieb John David Anglin:
> On 4/30/2013 10:02 AM, Rolf Eike Beer wrote:
> > Am 30.04.2013 15:00, schrieb John David Anglin:
> >> On 30-Apr-13, at 5:37 AM, Rolf Eike Beer wrote:
> >>> Compiling for my C8000 (64 bit) failed:
> >>> 
> >>> *arch/parisc/kernel/built-in.o: In function `sys_fork_wrapper':
> >>> *(.text+0x4dc8): relocation truncated to fit: R_PARISC_PCREL17F
> >>> against symbol
> >>> `sys_fork' defined in .text.sys_fork section in kernel/built-in.o
> >>> *hppa64-unknown-linux-gnu-ld: arch/parisc/kernel/built-in.o(.text
> >>> +0xllx):
> >>> cannot reach (null)
> >>> *arch/parisc/kernel/built-in.o: In function `sys_vfork_wrapper':
> >>> *(.text+0x4e1c): relocation truncated to fit: R_PARISC_PCREL17F
> >>> against symbol
> >>> `sys_vfork' defined in .text.sys_vfork section in kernel/built-in.o
> >>> *make: *** [vmlinux] Error 1
> >> 
> >> Some form of a 17-bit branch has been used (e.g., b), to branch to
> >> sys_fork.  Assume
> >> you are building without modules, so you have a big kernel.
> > 
> > I have modules, but I had seen an error before so I tried enabling
> > longcalls. Currently building without MLONGCALLS with new binutils to
> > see if it works then, i.e. the error below goes away.
> 
> Longcalls will not fix the above.  The option doesn't affect assembly code.
> 
> A "b" instruction is not a "call".  By that, I mean that the linker
> doesn't add long call stubs, etc.  It only
> supports a 17-bit pc-relative offset.  The prelinking done by linux can
> result in objects that are too big
> and out of range branches as above.
> 
> >> Problem seems to be here:
> >>         .macro  fork_like name
> >> 
> >> ENTRY(sys_\name\()_wrapper)
> >> 
> >>         LDREG   TI_TASK-THREAD_SZ_ALGN-FRAME_SIZE(%r30), %r1
> >>         ldo     TASK_REGS(%r1),%r1
> >>         reg_save %r1
> >>         mfctl   %cr27, %r28
> >>         b       sys_\name
> >>         STREG   %r28, PT_CR27(%r1)
> >> 
> >> ENDPROC(sys_\name\()_wrapper)
> >> 
> >>         .endm
> >> 
> >> If %r2 can be clobbered, the "b" instruction could be changed to the
> >> "BL" macro.
> >> This would give 22-bit branch on PA 2.0.  For example,
> >> 
> >> BL    sys_\name, %r2
> 
> Does this work?  I think %r2 should be available but I can't check at
> the moment.

Have not tried yet.

> >>> This is after I enabled MLONGCALLS, witho
> >>> ut longcalls it failed, too. I'm now
> >>> trying with binutils 2.23.1 instead of 2.22.
> >> 
> >> The above is not a binutils bug!
> > 
> > Nope, but probably this:
> > 
> > *hppa64-unknown-linux-gnu-ld: scripts/link-vmlinux.sh: line 52: 5398
> > Segmentation fault      ${LD} ${LDFLAGS} ${LDFLAGS_vmlinux} -o ${2} -T
> > ${lds} ${KBUILD_VMLINUX_INIT} --start-group ${KBUILD_VMLINUX_MAIN}
> > --end-group ${1}
> 
> No, it's probably a kernel bug.  Is the crash consistent?  If it isn't,
> then it's an OS or kernel bug.

I have got the same crash again. This are the first 2 tries I ever made with 
binutils 2.23.1 for 64 bit binaries, so I have nothing to compare to.

Eike

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

  reply	other threads:[~2013-04-30 16:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-30  9:37 Error compiling 3.9.0 Rolf Eike Beer
     [not found] ` <BLU0-SMTP783053E3D7F49E33ED18CB97B30@phx.gbl>
     [not found]   ` <e5606dd2f0529641a897f078e3814e82@sf-mail.de>
2013-04-30 14:45     ` John David Anglin
2013-04-30 16:40       ` Rolf Eike Beer [this message]
2013-05-02  1:34         ` John David Anglin
2013-05-02 12:41           ` Rolf Eike Beer
2013-05-03 19:06             ` John David Anglin

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=1428267.TfdjUgcdcj@eto \
    --to=eike-kernel@sf-tec.de \
    --cc=linux-parisc@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