Linux MIPS Architecture development
 help / color / mirror / Atom feed
* Jump/branch to external symbol
@ 2006-01-06 10:41 Alex Gonzalez
  2006-01-06 11:51 ` Maciej W. Rozycki
  0 siblings, 1 reply; 5+ messages in thread
From: Alex Gonzalez @ 2006-01-06 10:41 UTC (permalink / raw)
  To: linux-mips

Hi,

I am having GNU gas related problems when compiling assembler files
which contain jumps to external symbols, for example when jumping from
an assembler to a C function.

Using binutils-2.15 GAS will produce a "Cannot branch to undefined
symbol" error. Applying the patch at
http://sources.redhat.com/ml/binutils/2004-04/msg00476.html, which
creates an "allow_branch_to_undefined" option I am able to succesfully
compile an executable. I am happy with this as I only need to apply
the option to the problematic files and it does not change the
behaviour of gas in general.

Now, my crosscompiler toolchain is based on binutils-2.13. When I try
to apply the same patch to it, I get a different error, "Can not
represent BFD_RELOC_16_PCREL_S2 relocation in this object file
format".

There are various posts around referring to this problems. As a
consequence I have read different opinions, solutions that apply to
specific version or binutils, solutions more or less accepted by
everyone, and as usual I am very confused.

If I compile with "-mno-abicalls -fno-pic" gas reports no errors
(which I believe is what the Linux kernel does), but I need to link
with some pic libraries which use glibc, so this is not a valid
solution for me.

I am happy with the patch for binutils-2.15, and I would need a
solution for binutils-2.13.

Can anybody offer any help?

Thanks,
Alex

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

* Re: Jump/branch to external symbol
  2006-01-06 10:41 Jump/branch to external symbol Alex Gonzalez
@ 2006-01-06 11:51 ` Maciej W. Rozycki
  2006-01-06 14:52   ` Daniel Jacobowitz
  2006-01-07 11:15   ` Ralf Baechle
  0 siblings, 2 replies; 5+ messages in thread
From: Maciej W. Rozycki @ 2006-01-06 11:51 UTC (permalink / raw)
  To: Alex Gonzalez; +Cc: linux-mips

On Fri, 6 Jan 2006, Alex Gonzalez wrote:

> I am happy with the patch for binutils-2.15, and I would need a
> solution for binutils-2.13.
> 
> Can anybody offer any help?

 Well, the most obvious solution is upgrading to the current release, 
which is 2.16.1 now.  Otherwise you are probably on your own -- 2.15 is 
already somewhat old and 2.13 is ancient.

  Maciej

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

* Re: Jump/branch to external symbol
  2006-01-06 11:51 ` Maciej W. Rozycki
@ 2006-01-06 14:52   ` Daniel Jacobowitz
  2006-01-06 17:50     ` Alex Gonzalez
  2006-01-07 11:15   ` Ralf Baechle
  1 sibling, 1 reply; 5+ messages in thread
From: Daniel Jacobowitz @ 2006-01-06 14:52 UTC (permalink / raw)
  To: Maciej W. Rozycki; +Cc: Alex Gonzalez, linux-mips

On Fri, Jan 06, 2006 at 11:51:56AM +0000, Maciej W. Rozycki wrote:
> On Fri, 6 Jan 2006, Alex Gonzalez wrote:
> 
> > I am happy with the patch for binutils-2.15, and I would need a
> > solution for binutils-2.13.
> > 
> > Can anybody offer any help?
> 
>  Well, the most obvious solution is upgrading to the current release, 
> which is 2.16.1 now.  Otherwise you are probably on your own -- 2.15 is 
> already somewhat old and 2.13 is ancient.

Or better yet to trunk and you won't need any patches for this.

-- 
Daniel Jacobowitz
CodeSourcery

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

* Re: Jump/branch to external symbol
  2006-01-06 14:52   ` Daniel Jacobowitz
@ 2006-01-06 17:50     ` Alex Gonzalez
  0 siblings, 0 replies; 5+ messages in thread
From: Alex Gonzalez @ 2006-01-06 17:50 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: Maciej W. Rozycki, Alex Gonzalez, linux-mips

Thanks, that works. Somehow it didn't occurred to me to try it.
Alex 

On Fri, 2006-01-06 at 09:52 -0500, Daniel Jacobowitz wrote:
> On Fri, Jan 06, 2006 at 11:51:56AM +0000, Maciej W. Rozycki wrote:
> > On Fri, 6 Jan 2006, Alex Gonzalez wrote:
> > 
> > > I am happy with the patch for binutils-2.15, and I would need a
> > > solution for binutils-2.13.
> > > 
> > > Can anybody offer any help?
> > 
> >  Well, the most obvious solution is upgrading to the current release, 
> > which is 2.16.1 now.  Otherwise you are probably on your own -- 2.15 is 
> > already somewhat old and 2.13 is ancient.
> 
> Or better yet to trunk and you won't need any patches for this.
> 

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

* Re: Jump/branch to external symbol
  2006-01-06 11:51 ` Maciej W. Rozycki
  2006-01-06 14:52   ` Daniel Jacobowitz
@ 2006-01-07 11:15   ` Ralf Baechle
  1 sibling, 0 replies; 5+ messages in thread
From: Ralf Baechle @ 2006-01-07 11:15 UTC (permalink / raw)
  To: Maciej W. Rozycki; +Cc: Alex Gonzalez, linux-mips

On Fri, Jan 06, 2006 at 11:51:56AM +0000, Maciej W. Rozycki wrote:

> > solution for binutils-2.13.
> > 
> > Can anybody offer any help?
> 
>  Well, the most obvious solution is upgrading to the current release, 
> which is 2.16.1 now.  Otherwise you are probably on your own -- 2.15 is 
> already somewhat old and 2.13 is ancient.

Binutils 2.15 may crash when building particular configurations, so 2.15
is no longer acceptable for building the kernel.

  Ralf

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

end of thread, other threads:[~2006-01-07 11:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-06 10:41 Jump/branch to external symbol Alex Gonzalez
2006-01-06 11:51 ` Maciej W. Rozycki
2006-01-06 14:52   ` Daniel Jacobowitz
2006-01-06 17:50     ` Alex Gonzalez
2006-01-07 11:15   ` Ralf Baechle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox