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

From: Eric W. Biederman (ebiederm@xmission.com)
Date: Fri Apr 05 2002 - 03:29:49 EST


Martin Mares <mj@ucw.cz> writes:

> Hello!
>
> > Instead removes the assumption the code is linked to run at 0. The
> > binary code is already PIC, this makes the build process the same way,
> > making the build requirements more flexible.
>
> What are the reasons to do this change? The assumption that "linked at 0"
> assumptions looks pretty harmless and the "-start"'s everywhere are ugly.

Short answer the current assembly is broken.

Long answer.

Without the "-start"'s the gas generates a relocation record for
every one of those instructions. The correct syntax with gas is ugly.
If you can find the gas equivalent of an assume %ds ... directive I will use
it.

The fact that you can't treat the generated .o as a normal object
is simply a maintenance nightmare.

With this change it is possible to write a linker script that
generates a bzImage. I won't do it as every other build of ld
is broken with respect to interesting linker scripts. But there are
still some subsets of that idea that make sense.

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/



This archive was generated by hypermail 2b29 : Sun Apr 07 2002 - 22:00:16 EST