-
Bug
-
Resolution: Unresolved
-
Medium
-
Code Generation Tools
-
CODEGEN-11787
-
ARM_20.2.7.LTS
-
ARM_20.2.8.LTS*
-
default
The attached file.cpp has these lines ...
class Foo { public: std::initializer_list<int> list; }; extern "C" void foo() { Foo f; f.list = {1, 2, 3}; }
These commands use the tiarmclang compiler to demonstrate how to rename the function foo to new_foo in file.o. It works as expected.
$ tiarmclang -c file.cpp $ tiarmnm -g file.o 00000000 W _ZN3FooC2Ev 00000000 W _ZNSt16initializer_listIiEC2B6v15007Ev 00000000 T foo 00000000 T main $ tiarmobjcopy --redefine-sym=foo=new_foo file.o $ tiarmnm -g file.o 00000000 W _ZN3FooC2Ev 00000000 W _ZNSt16initializer_listIiEC2B6v15007Ev 00000000 T main 00000000 T new_foo
Try to do the same thing with the TI proprietary Arm compiler.
$ armcl file.cpp "file.cpp", line 11: warning: variable "f" was set but never used $ armnm -g file.obj 00000000 w Lib$$Request$$armlib 00000000 w Lib$$Request$$cpplib 00000000 T _ZNSt16initializer_listIiEC1EPKij 00000000 D __TI_DW.debug_info.$base_types.c8c38483d660372cd06395436475430b 00000000 D __TI_DW.debug_info.__nullptr.00aa6df198752dba3b67ac8321ad2f66 00000000 D __TI_DW.debug_info.file.cpp.b84ea05f221825bc66362f8fbb448d48 00000000 D __TI_DW.debug_info.initializer_list.1565c98bf61f4509834669b5f1ef3cb7 00000000 D __TI_DW.debug_info.stddef.h.d85e8dfff01350aab321cc12d269aa87 00000000 T foo 00000004 T main $ armobjcopy --redefine-sym=foo=new_foo file.obj armobjcopy.exe: error: invalid alignment 1 of group section '_ZNSt16initializer_listIiEC1EPKij'
The armobjcopy command fails.