Andes Workshop
http://forum.andestech.com/

list all removed sections
http://forum.andestech.com/viewtopic.php?f=23&t=905
Page 1 of 1

Author:  maolj [ Mon Dec 15, 2014 3:41 pm ]
Post subject:  list all removed sections

when use -ffunction-sections and -fdata-sections
Attachment:
ffunction-data-section.png
ffunction-data-section.png [ 79.42 KiB | Viewed 3885 times ]


it will remove unused function/data sections. but how to check which sections will be removd,
we can use --print-gc-sections option to output all removed sections
add linker option: -Wl,--print-gc-sections:
Attachment:
print-removed-sections.png
print-removed-sections.png [ 78.81 KiB | Viewed 3885 times ]


we can see the last linker options like below:
Attachment:
ld-options.png
ld-options.png [ 80.11 KiB | Viewed 3883 times ]


output removed sections like below:
Attachment:
example-of-removed-sections.png
example-of-removed-sections.png [ 29.24 KiB | Viewed 3885 times ]

Page 1 of 1 All times are UTC + 8 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/