Hi,
I need to embed some type information in my assembly program for a simple Object-Oriented language. I need to embed a virtual method table and information about the base class of an object.
I tried to embed it in the .data section of my assembly program, for each type in the following format:
- address of the base type (or 0 if it does not have a base type)
- for every method in that type, an id of the method and the address of the code of this method
- 0 to indicate end of methods and therefore end of type data
I end up with the following, actual code replaced by nops:
section .data
type_Object dw 0, 0
type_Object_array dw type_Object, 0
type_A dw type_Object, 1, method_A_override, 2, method_A_base, 0
type_A_array dw type_Object, 0
type_B dw type_A, 1, method_B_override, 3, method_B_sub, 0
type_B_array dw type_Object, 0
type_Main dw type_Object, 4, method_Main_main, 0
type_Main_array dw type_Object, 0
section .text
method_A_override:
nop
method_A_base:
nop
method_B_override:
nop
method_B_sub:
nop
method_Main_main:
nop
I compile using -f win32, and I get:
VirtualMethod.javali.s:3: error: COFF format does not support non-32-bit relocations
VirtualMethod.javali.s:4: error: COFF format does not support non-32-bit relocations
VirtualMethod.javali.s:4: error: COFF format does not support non-32-bit relocations
VirtualMethod.javali.s:4: error: COFF format does not support non-32-bit relocations
VirtualMethod.javali.s:5: error: COFF format does not support non-32-bit relocations
VirtualMethod.javali.s:6: error: COFF format does not support non-32-bit relocations
VirtualMethod.javali.s:6: error: COFF format does not support non-32-bit relocations
VirtualMethod.javali.s:6: error: COFF format does not support non-32-bit relocations
VirtualMethod.javali.s:7: error: COFF format does not support non-32-bit relocations
VirtualMethod.javali.s:8: error: COFF format does not support non-32-bit relocations
VirtualMethod.javali.s:8: error: COFF format does not support non-32-bit relocations
VirtualMethod.javali.s:9: error: COFF format does not support non-32-bit relocations
I don't understand why these error messages are generated and am thankful for any explanations.