Andes Workshop

It is currently Thu Jun 29, 2017 4:05 am

All times are UTC + 8 hours [ DST ]




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: list all removed sections
PostPosted: Mon Dec 15, 2014 3:41 pm 
Offline

Joined: Wed Aug 27, 2014 1:00 pm
Posts: 12
when use -ffunction-sections and -fdata-sections
Attachment:
ffunction-data-section.png
ffunction-data-section.png [ 79.42 KiB | Viewed 1532 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 1532 times ]


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


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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 8 hours [ DST ]


Who is online

Users browsing this forum: Google [Bot] and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group