SPARC assembly won't compile, problems with NT headers
Troy Rollo
wine at troy.rollo.name
Thu Dec 22 01:05:59 CST 2005
winegcc from the current WineHQ produces assembly output for SPARC systems
that cannot be processed by the assembler.
1. "operation combines symbols in different segments" error.
This problem arises because the imports code attempts to generate a relocation
involving symbols in different segments (one in the text segment and one in
the data segment). SPARC assemblers (including gas on a SPARC) cannot deal
with relocations involving symbols in different segments. This only affects
position independent code and can be avoided by changing the assembly code
output in imports.c to something simpler.
2. "can't resolve `_end' {*UND* section} - `.L__wine_spec_rva_base' {.data
section}"
This problem is more sinister. It arises from the same limitation as the first
problem, but is not susceptible to being worked around. The offending code is
the code that attempts to generate the NT header of the executable -
specifically the SizeOfImage element. I can't see any way at this point to
provide for this calculation to be done until after the linker output is
generated. I suspect the solution to this problem is to just output a zero in
this location and have winegcc modify the executable image to insert the
correct values after the linker has created it.
Does anybody have any objections to this solution or another approach to
suggest?
--
Troy Rollo - wine at troy.rollo.name
More information about the wine-devel
mailing list