Re: [PATCH] x86 Boot enhancements, pic 16 4/9

Eric W. Biederman (ebiederm@xmission.com)
05 Apr 2002 02:44:09 -0700


Martin Mares <mj@ucw.cz> writes:

> Hello!
>
> > Show me a linker script that can link together bootsect.o and bsetup.o.
>
> I don't have enough time to experiment with it at this very moment
> and I admit that the linker bugs you've mentioned make it impossible,
> but the objdump solution I mentioned (and tried a couple of minutes ago)
> works and although it isn't perfect, it's lovely compared to the
> "-start" hack.

Given that I want a relative offset, and I have explicitly coded a
relative offset, I don't see how that is a hack. I see assembly
for is telling the machine explicitly what to do and that does.

The fact the correct way to code the instruction looks ugly is a gas
bug/deficiency. Perhaps a gas developer will look at how ugly that
code is and improve gas.

One of the other reasons I want to do it this way is in case is to
make copying code easier. If you use idioms that work equally well
everywhere and for every case it is easier to switch between projects
using the same tool. And the assume 0 hack isn't useful when
switching from real to protected mode while using the code segment
you got from the reset vector. Although it is kind of fun running
real mode code with a code segment base of 0xffff0000.

Eric
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/