Bug 20650 - ld does not check if an object file was generated on the right architecture
Summary: ld does not check if an object file was generated on the right architecture
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: binutils
Version: 6.2
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: David Lawrence
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-11-10 17:07 UTC by Need Real Name
Modified: 2007-04-18 16:29 UTC (History)
0 users

(edit)
Clone Of:
(edit)
Last Closed: 2004-10-02 19:11:27 UTC


Attachments (Terms of Use)

Description Need Real Name 2000-11-10 17:07:11 UTC
If you generate an object file on a platform and try to link it on another
platform, ld dumps a core file. No check is performed regarding the
architecture used for the generation.

$ file spec.o
spec.o:      ELF 32-bit MSB relocatable, SPARC, version 1, not stripped
$ ld spec.o
ld: warning: cannot find entry symbol _start; defaulting to 08048078
Segmentation fault (core dumped)

Comment 1 Jakub Jelinek 2004-10-02 19:11:27 UTC
Current ld certainly seems to complain:
/usr/bin/ld: warning: i386 architecture of input file `a.o' is incompatible with i386:x86-64 output


Note You need to log in before you can comment on or make changes to this bug.