Hi,
I would like to remove Debug Section (including STRTAB and SYMTAB) in ELF using Codewarrior compile options.
I set to Off for "Generate DWARF Information".
But, ELF still has STRTAB and SYMTAB sections.
Please let me know how to remove STRTAB and SYNTAB from ELF.
Can I use strip ccmd? If possible, let me know how to use it.
Codewarrior Version : Version 11.0
Thanks.
Hello, Celeste_Liu.
Thanks for your kind reply.
I am using the CodeWarrior for MCU version 11.0.
My IDE is slightly different with images in your comments.
There are no "Generate ELF Symbol Table" and "Generate binary flash image" menus, but there is a "Generate ROM Image" menu.
The "Generate ROM Image" menu is always checked.
If we unchecked the menu, we can't make an elf image file.
Thanks.
I'm sorry that I wasn't help you. I'm using CodeWarrior version 11.1. I suggest that you ask questions in the following forum to see if they have any new ideas.
BRs,
Celeste
Hello Celeste_Liu,
Thanks for your reply.
But, I don't know how to use your comments.
I am using MPC5674F.
Could you explain it in more detail, please?
I can't find any file releated to the "strip" at "Freescale" folder.
And, When I added your advice to the Post-build steps in CodeWarrior, I got an error saying that the 'strip' command could not be found.
Thnaks.
Hello @Luke_K ,
Thanks for your post. I think you can use strip command to remove STRTAB and SYNTAB from ELF. Could you please try "strip --remove-section=.symtab file" and "strip --remove-section=.strtab file"?
And could you please tell me which chip you are using?
Hope it can help you.
BRs,
Celeste
Hello Celeste_Liu,
Thanks for your reply.
But, I don't know how to use your comments.
I am using MPC5674F.
Could you explain it in more detail, please?
I can't find any file releated to the "strip" at "Freescale" folder.
And, When I added your advice to the Post-build steps in CodeWarrior, I got an error saying that the 'strip' command could not be found.
Thnaks.
Hello @Luke_K ,
I haven't used MPC series chips before. I choose an ELF file of MC56F84789 for testing. The strip command can be used in the Ubuntu system. Unfortunately, the ELF format of MC56F84789 couldn't be recognized by it.
You can try this command "strip -R.strtab -R.symtab xxx.elf" with your file. I have another idea for your reference. You can directly generate the binary file format. It won't contain the contents of symtab and strtab, and the file size is much smaller compared to that of an elf. file.
Settings for generating BIN files in CodeWarrior:
1. Select your project, and then click project - properties.
2. Find "generate binary flash image" according to the picture below.
Hope it can help you.
BRs,
Celeste