This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] ld/ldlang.c: fatal error on architecture mismatch
Daniel Jacobowitz <drow@false.org> writes:
> On Thu, May 03, 2007 at 09:28:27AM -0700, Ian Lance Taylor wrote:
> > Daniel Jacobowitz <drow@false.org> writes:
> >
> > > Would anyone be more amenable to making it an error with an entry in
> > > NEWS or in the manual describing how to build an image without an
> > > entry point? Someone else will have to write it; I never do that.
> >
> > Building an image without an entry point is trivial: link as usual,
> > then objcopy -O binary.
>
> I don't know what you mean, but it's not what I mean. That binary
> still has an entry point; it's just not recorded in the binary file.
> It may be in the ELF file, and tools which use the ELF file (like
> GDB, or static analysis tools) may use it.
Sure. The entry point is implicit in the binary file. It may be at
the start of the file, or it may be at a fixed address. That works
fine today no matter what you use for ENTRY in the linker script, or
whether you use ENTRY at all. You may get a linker warning which you
will always ignore. Your proposal will change that to a hard error.
I'm not going to continue replying on this thread. I think I've made
my point: the proposed change will break some currently working
builds. This isn't hypothetical: I know builds that will break. That
doesn't mean we can't do it, it's just something to consider.
Ian