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

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