Project

General

Profile

Bug #3494

cross linkers probably report bad error messages

Added by Rich Lowe almost 8 years ago.

Status:
New
Priority:
Low
Assignee:
-
Category:
tools - gate/build tools
Start date:
2013-01-21
Due date:
% Done:

0%

Estimated time:
Difficulty:
Bite-size
Tags:
needs-triage
Gerrit CR:

Description

doreloc.c includes machdep.h, which includes the right machdep.h based on the platform preprocessor symbol (__i386, say). We end up using M_MACH when reporting errors, set in the platform machdep.h

Unfortunately, this probably means that the cross-linker when it encounters a relocation of unsupported size, will mis-report the relocation by using the native name, rather than the target name, since we included machdep.h not explicitly machdep_sparc.h or whatever, so M_MACH will be the host machine not the target.

You can see this by adding, for eg

#if M_MACH == EM_386
#error "I think I'm an i386!" 
#endif

to the SPARC doreloc.c

The doreloc.c's should probably explicitly include their own machdep header.

No data to display

Also available in: Atom PDF