Andes Workshop http://forum.andestech.com/ |
|
Cut section (objcopy option -R) http://forum.andestech.com/viewtopic.php?f=25&t=811 |
Page 1 of 1 |
Author: | cindy [ Thu Mar 06, 2014 11:38 pm ] |
Post subject: | Cut section (objcopy option -R) |
This is a example: Attachment: The bin file is from 0x0~0x30004, size is 0x30004 bytes. (196612 bytes) Attachment: Sample code: Attachment: ---------------------------------------------------------------- Remove the last section .section2 from bin file. The new bin file is from 0x0~0x2004, size is 0x2004 bytes. (8196 bytes) Command: nds32le-elf-objcopy -S -O binary -R .section2 "cut-section-remove.adx" output/cut-section-remove.bin AndeSight setting: Attachment: Attachment: Attachment: Sample: Attachment:
|
Author: | cindy [ Fri Mar 21, 2014 3:36 pm ] |
Post subject: | Re: Cut section (objcopy option -R) |
Another way: Set .mybss as "@nobits!". Code: __attribute__((section(".mybss, \"aw\", @nobits!")))
|
Author: | cindy [ Tue Aug 12, 2014 11:09 am ] |
Post subject: | Re: Cut section (objcopy option -R) |
If you want only copy section, you can use -j option -j --only-section <name> Only copy section <name> into the output Attachment: _j.png [ 48.58 KiB | Viewed 11882 times ] |
Author: | ianfeng [ Tue Aug 12, 2014 11:20 am ] |
Post subject: | Re: Cut section (objcopy option -R) |
Only output specific section .section1 from .adx file to .bin file. Only section command: nds32le-elf-objcopy -S -O binary -j .section1 "cut-section-remove.adx" output/only-section1.bin The output "only-section1.bin" will be 0x000004d2 = 1234. |
Page 1 of 1 | All times are UTC + 8 hours [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |