I was pretty bored one lonely day, and decided to brush up on my assembly
knowledge by taking all of the Intel syntax i386 assembly, and rewriting
it in AT&T (gas friendly) syntax.
Pointless? Naw! Here are a few good things that came out of it:
o The kernel is no longer dependent on as86/ld86. Wonderful!
o Personally, I find AT&T style much more readable, not to
mention that this is the *only* part of the kernel still using
as86/ld86.
o build.c is a bit smaller since it doesn't have to mess
with minix style (aka ld86) output.
o It's a patch that removes/tidies up code!
Everybody loves those.
Files touched:
arch/i386/Makefile
arch/i386/boot/bootsect.S
arch/i386/boot/setup.S
arch/i386/boot/video.S
arch/i386/boot/Makefile
arch/i386/boot/tools/build.c
(up to date as of kernel v2.2.4)
To-do:
1) Ask maintainers if it was alright for me to slash through their
code like this. :)
2) There are still few minor bugs in gas' 16-bit code, so I had to
hard-code one troublesome instruction. (Clearly marked in video.S)
(maybe fixed in latest binutils? Haven't tested yet, will do ASAP)
3) I have no idea how to properly tell the linker where to find
bootsect_kludge (in setup.S) from bootsect.S (line 245), so I just
hacked the makefile to do "--defsym bootsect_kludge=0x220" since the
offset into setup where bootsect_kludge should hide is always going to
be 0x20. There's got to be a cleaner way, right? Somebody tell me how.
4) Fix wrapped comments.
I had basically finished this last summer, but didn't want to even try and
squeeze it into those last few 2.1's. Even if it wasn't the 'right' thing
to do, I learned a bunch from it.. so don't be afraid to shoot me down (or
talk me up, whichever the case may be). :)
And of course this is planned for 2.3, I'm just looking for feedback
beforehand.
Comments please!
(Martin, Linus, cc'ed because you appear to be the current maintainers)
Chris Noe
(stiker@northlink.com)
-- --------------------------------------------------------- #!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj $/=unpack('H*',$_);$_=`echo 16dio\U$k"SK$/SM$n\EsN0p[lN*1 lK[d2%Sa2/d0$^Ixp"|dc`;s/\W//g;$_=pack('H*',/((..)*)$/) ---- http://online.offshore.com.ai/arms-trafficker/ -----
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/