A bug in 2.9.1 SH linker
Jeffrey A Law
law@cygnus.com
Mon Jan 4 19:21:00 GMT 1999
In message < 199901042312.SAA13958@qnx.com >you write:
>
> --%--multipart-mixed-boundary-1.264.915491563--%
> Content-Type: text/plain; charset=us-ascii
> Content-Transfer-Encoding: 7bit
>
> Hi there,
>
> I found a bug in gcc linker for Hitachi SH4 of release 2.9.1:
>
> When object files are linked to an relocateable executable file,
> and then the relocateable is linked to a fix-address executable, the
> address of calls to local functions (in the same module) are wrong.
> They are called to wrong places.
>
> However, if object files are linked directly to a fix-address
> excutable file, there is no problem.
>
> An example are attached with one makefile, two C files and a link
> script file.
> When the example is maked, two final executables are generated --
> "wrong" and "right". "right" is generated directly from object files;
> "wrong" is generated from a relocateable "mid", and "mid" is
> generated by link the object files relocateably.
> When the file "wrong" is examined by "objdump", we could see that two
> calls in function "main" (to local funcations in the module main.c)
> are wrong(calling into wrong address).
>
> Quick fixes will be greatly appreciated as we are blocked by this
> bug.
>
> Thanks and regards,
Problems with the linker, assembler and other binary utilities should
probably go to bug-gnu-utils@gnu.org or something like that. They are not
part of egcs.
jeff
More information about the Gcc-bugs
mailing list