我目前使用 arm env 在 Intel x118 平台上工作。我发现我必须强制打开这个选项以确保链接没有问题,否则会出现如下错误:
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.
谁能告诉我,如果此--enum_is_int
选项对我的目标文件产生重大影响?
更多的信息:
我发现了一些关于 ARM 的评论:
--enum_is_int
此选项强制所有枚举类型的大小至少为四个字节。
默认情况下关闭此选项,并使用可以保存所有枚举器值的最小数据类型。
如果在命令行中指定 ARM Linux 配置文件,则默认开启此选项。
注意--enum_is_int
不建议
将该选项用于一般用途。