Andes Workshop

It is currently Tue Sep 26, 2017 2:52 pm

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 1691 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 1691 times ]


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


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


Top
 Profile Send private message E-mail  
 
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