secondary.inc used to be concatenated into the same file as the definition of gdt (from entry32.inc). Maybe you just need to wrap gdt in EXT() to show it's now an external reference to be resolved by the linker? ie:
[andrew@starbug src]$ diff arch/i386/smp/secondary.S.orig arch/i386/smp/secondary.S 75,76c75,76 < .word gdt_end - gdt - 1 /* compute the table limit */ < .long gdt /* we know the offset */ ---
.word EXT(gdt_end) - EXT(gdt) - 1 /* compute the table limit */ .long EXT(gdt) /* we know the offset */
labels like "gdtptr" are already exported in entry32.inc, so this may also need to be done to "gdt" and "gdt_end" so the linker can resolve the external references. ie
[andrew@starbug src]$ diff cpu/i386/entry32.inc.orig cpu/i386/entry32.inc 22c22,23 < gdt: ---
.globl EXT(gdt) EXT(gdt):
64c65,66 < gdt_end: ---
.globl EXT(gdt_end) EXT(gdt_end):
I'm still working out the structure of the code so I can look integrating the SC520 and I haven't compiled these changes so I may be completely off track...
Andrew
-----Original Message----- From: linuxbios-admin@clustermatic.org [mailto:linuxbios-admin@clustermatic.org]On Behalf Of Ronald G Minnich Sent: Friday, 18 October 2002 9:04 AM To: linuxbios@clustermatic.org Subject: e7500 and gas and undefined and ...
OK, here is a fun one. secondary.inc moved to separate compilation as secondary.S
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: gdtaddr: .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 needed?
ron
Linuxbios mailing list Linuxbios@clustermatic.org http://www.clustermatic.org/mailman/listinfo/linuxbios