This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Need armcc cmd line Option for not to generate.comment section at compile time

Note: This was originally posted on 5th February 2012 at http://forums.arm.com

Hi,

With --no_debug option, armcc is not removing .comment section. may i know whether we have any explicit option to remove .comment section during compile time.


Compiling source tmp.c with --no_debug option.



D:\Builds\temp>armcc -o tmp.o -c tmp.c --no_debug
"tmp.c", line 6: Warning:  #1-D: last line of file ends without a newline
  }
   ^
tmp.c: 1 warning, 0 errors


Dumping .comment section of tmp.o



D:\Builds\temp>objdump --full-contents --section=.comment tmp.o

tmp.o:  file format elf32-little

Contents of section .comment:
0000 41524d2f 5468756d 6220432f 432b2b20  ARM/Thumb C/C++
0010 436f6d70 696c6572 2c205256 4354322e  Compiler, RVCT2.
0020 32205b42 75696c64 20353933 5d006172  2 [Build 593].ar
0030 6d636320 2d2d6661 73746c69 63656e73  mcc --fastlicens
0040 65202d2d 73697465 6c696365 6e736520  e --sitelicense
0050 2d63202d 6f746d70 2e6f2074 6d702e63  -c -otmp.o tmp.c
0060 00                          .





Thanks in Advance..!!!


-Pavan.
Parents
  • Note: This was originally posted on 12th February 2012 at http://forums.arm.com


    Or as you have RVCT, you can use fromelf.


    I think Strip tool doesn't support the ARM obj files .Also confirmed by running it.

    And From ELF is not removing comment section from relocatable obj files.

    Any ways i don't want to extend my Build Time.. as there more than 10k files.. using strip/ fromelf  on all them.. i think performance degrades. so looking for option at compile time.


    Thank,
    Pavan.
Reply
  • Note: This was originally posted on 12th February 2012 at http://forums.arm.com


    Or as you have RVCT, you can use fromelf.


    I think Strip tool doesn't support the ARM obj files .Also confirmed by running it.

    And From ELF is not removing comment section from relocatable obj files.

    Any ways i don't want to extend my Build Time.. as there more than 10k files.. using strip/ fromelf  on all them.. i think performance degrades. so looking for option at compile time.


    Thank,
    Pavan.
Children
No data