All of lore.kernel.org
 help / color / mirror / Atom feed
* Gcc - can't branch to undefined symbol
@ 2004-01-29 20:25 ` Jerry Walden
  0 siblings, 0 replies; 4+ messages in thread
From: Jerry Walden @ 2004-01-29 20:25 UTC (permalink / raw)
  To: linux-mips

Hello -

I am using gcc 3.3.2 - when I assemble a file that has a branch to a
label, and the label is not defined in the .S file (i.e. there is no
extern - the label exists in another .S file) the error "cannot branch
to an undefined symbol" results.  Using an older version of
mipsel-gnu-linux-gcc does not report this error.  Any idea what I am
doing wrong?

Thanks

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

* Gcc - can't branch to undefined symbol
@ 2004-01-29 20:25 ` Jerry Walden
  0 siblings, 0 replies; 4+ messages in thread
From: Jerry Walden @ 2004-01-29 20:25 UTC (permalink / raw)
  To: linux-mips

Hello -

I am using gcc 3.3.2 - when I assemble a file that has a branch to a
label, and the label is not defined in the .S file (i.e. there is no
extern - the label exists in another .S file) the error "cannot branch
to an undefined symbol" results.  Using an older version of
mipsel-gnu-linux-gcc does not report this error.  Any idea what I am
doing wrong?

Thanks

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

* Re: Gcc - can't branch to undefined symbol
  2004-01-29 20:25 ` Jerry Walden
  (?)
@ 2004-01-29 22:14 ` Ralf Baechle
  2004-01-30  6:32   ` Thiemo Seufer
  -1 siblings, 1 reply; 4+ messages in thread
From: Ralf Baechle @ 2004-01-29 22:14 UTC (permalink / raw)
  To: Jerry Walden; +Cc: linux-mips

On Thu, Jan 29, 2004 at 12:25:16PM -0800, Jerry Walden wrote:

> I am using gcc 3.3.2 - when I assemble a file that has a branch to a
> label, and the label is not defined in the .S file (i.e. there is no
> extern - the label exists in another .S file) the error "cannot branch
> to an undefined symbol" results.  Using an older version of
> mipsel-gnu-linux-gcc does not report this error.  Any idea what I am
> doing wrong?

This construct is illegal because it cannot be represented in MIPS ELF.

  Ralf

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

* Re: Gcc - can't branch to undefined symbol
  2004-01-29 22:14 ` Ralf Baechle
@ 2004-01-30  6:32   ` Thiemo Seufer
  0 siblings, 0 replies; 4+ messages in thread
From: Thiemo Seufer @ 2004-01-30  6:32 UTC (permalink / raw)
  To: Jerry Walden; +Cc: Ralf Baechle, linux-mips

Ralf Baechle wrote:
> On Thu, Jan 29, 2004 at 12:25:16PM -0800, Jerry Walden wrote:
> 
> > I am using gcc 3.3.2 - when I assemble a file that has a branch to a
> > label, and the label is not defined in the .S file (i.e. there is no
> > extern - the label exists in another .S file) the error "cannot branch
> > to an undefined symbol" results.  Using an older version of
> > mipsel-gnu-linux-gcc does not report this error.  Any idea what I am
> > doing wrong?
> 
> This construct is illegal because it cannot be represented in MIPS ELF.

MIPS ELF could do (modulo some documentation bug in the spec), it is
specifically the assembler which forbids branches to external labels.
I wrote once a patch to allow it, but this broke NewABI support in turn.

It would be nice optimization as long as the linker can guarantee the
code is in the maximum branch range (+-128k).


Thiemo

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

end of thread, other threads:[~2004-01-30  6:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-29 20:25 Gcc - can't branch to undefined symbol Jerry Walden
2004-01-29 20:25 ` Jerry Walden
2004-01-29 22:14 ` Ralf Baechle
2004-01-30  6:32   ` Thiemo Seufer

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.