Question

I currently working on Intel x118 platform using arm env. I found I must force to open this option to ensure link has no problem, otherwise, it will occur errors like:

Error: L6242E: Cannot link object iui_os_irq_msk.o as its attributes are incompatible with the image attributes.
   ... packed-enum clashes with enum_is_int.
Error: L6242E: Cannot link object iui_os.o as its attributes are incompatible with the image attributes.
   ... packed-enum clashes with enum_is_int.
Error: L6242E: Cannot link object uta_os.o as its attributes are incompatible with the image attributes.
   ... packed-enum clashes with enum_is_int.
Error: L6242E: Cannot link object uta_os_critical_section.o as its attributes are incompatible with the image attributes.
   ... packed-enum clashes with enum_is_int.
Error: L6242E: Cannot link object uta_os_thread.o as its attributes are incompatible with the image attributes.
   ... packed-enum clashes with enum_is_int.
Error: L6242E: Cannot link object uta_os_event.o as its attributes are incompatible with the image attributes.
   ... packed-enum clashes with enum_is_int.
Error: L6242E: Cannot link object uta_os_event_group.o as its attributes are incompatible with the image attributes.
   ... packed-enum clashes with enum_is_int.
Error: L6242E: Cannot link object uta_os_queue.o as its attributes are incompatible with the image attributes.
   ... packed-enum clashes with enum_is_int.
Error: L6242E: Cannot link object uta_os_sem.o as its attributes are incompatible with the image attributes.
   ... packed-enum clashes with enum_is_int.
Error: L6242E: Cannot link object uta_os_common.o as its attributes are incompatible with the image attributes.
   ... packed-enum clashes with enum_is_int.
Error: L6242E: Cannot link object uta_os_mem.o as its attributes are incompatible with the image attributes.
   ... packed-enum clashes with enum_is_int.
Not enough information to list image symbols.
Not enough information to list the image map.
Finished: 13 information, 0 warning and 11 error messages.

can anybody tell me, if this --enum_is_int option make significant influence on my target file?

further information:

I found some comment on ARM:

--enum_is_int

This option forces the size of all enumeration types to be at least four bytes.

This option is switched off by default and the smallest data type is used that can hold the values of all enumerators.

If you specify an ARM Linux configuration file on the command line, this option is switched on by default.

Note The --enum_is_int option is not recommended for general use.

Was it helpful?

Solution

The option might increase the memory foot print of your code slightly but probably not significantly. It's safe to use and is required in this case since the linker will not link objects is deems incompatible.

That said, you might be able to override the linker error using the --diag-warning=6242 command line option but the resulting image may not work properly.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top