e7500 and gas and undefined and ...

Ronald G Minnich rminnich at lanl.gov
Thu Oct 17 18:47:01 CEST 2002

OK, here is a fun one. secondary.inc moved to separate compilation as

It won't assemble:

secondary.s: Assembler messages:
secondary.s:87: Error: subtraction of two symbols in different sections
`gdt_end' {*UND* section} - `gdt' {*UND* section} at file address 155
make: *** [secondary.o] Error 1

The problem code is:
        .word   gdt_end - gdt - 1 /* compute the table limit */
        .long   gdt                /* we know the offset */

Now, I have to sign off -- kids and all that -- and I'm hoping some of you
gas experts can puzzle this out. What should happen is that the gdtaddr in
secondary.S will have pointers to the gdt defined in crt0.S. Obviously
something needs fixing here so that the undefined references in
secondary.S are properly set up so you have a gdt in secondary.S. One
option is to include the gdt from the .inc file.

That *UND* section is kind of suspicious -- Maybe another directive is


More information about the coreboot mailing list