Uploaded image for project: 'Embedded Software & Tools'
  1. Embedded Software & Tools
  2. EXT_EP-11551

armobjcopy fails with error: invalid alignment 1 of group section

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Medium Medium

      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.

            syncuser TI User
            syncuser TI User
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: