Bug 21472 - Gcc generates CALL16 reloc that ld objects to
Summary: Gcc generates CALL16 reloc that ld objects to
Status: RESOLVED INVALID
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.0.0
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: build
Depends on:
Blocks:
 
Reported: 2005-05-09 16:28 UTC by Paul Koning
Modified: 2005-07-23 22:49 UTC (History)
2 users (show)

See Also:
Host: i386-netbsdelf
Target: mipsel-netbsdelf
Build: i386-netbsdelf
Known to work:
Known to fail:
Last reconfirmed:


Attachments
Preprocessed source file of the code that shows the problem (5.47 KB, text/plain)
2005-05-09 16:30 UTC, Paul Koning
Details
Assembly file generated by gcc 4.0.0 (3.09 KB, text/plain)
2005-05-09 16:31 UTC, Paul Koning
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Koning 2005-05-09 16:29:04 UTC
Compiling lib/csu/common_elf/crtbegin.c in the NetBSD 1.6.2 source tree with gcc
4.0.0 and binutils 2.16, I get complaints from ld:
  crtbeginS.o: CALL16 reloc at 0xfc not against global symbol

The call16 is in the .s file generated by gcc, but I can't tell why it's any
different from the others.  Will attach .i and .s files (it would be nice if you
could do that when entering a bug...)
Comment 1 Paul Koning 2005-05-09 16:30:56 UTC
Created attachment 8845 [details]
Preprocessed source file of the code that shows the problem
Comment 2 Paul Koning 2005-05-09 16:31:25 UTC
Created attachment 8846 [details]
Assembly file generated by gcc 4.0.0
Comment 3 Andrew Pinski 2005-05-09 17:15:25 UTC
	lw	$25,%call16(fini_fallthru)($28)

I want to say the above is the problem and it is a local symbol but to GCC it is a global one.
Comment 4 Richard Sandiford 2005-05-16 13:11:32 UTC
Andrew's right.  You're telling gcc that init_fallthru() and fini_fallthru()
are global functions, but your asms define it to be a local function.