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

Keep unused function when optimize with -ffunction-sections
http://forum.andestech.com/viewtopic.php?f=16&t=843
Page 1 of 1

Author:  jerry [ Mon May 12, 2014 4:33 pm ]
Post subject:  Keep unused function when optimize with -ffunction-sections

The functionA is unused in the programming code.

The compiler setting the optimize with Remove unused function sections.

The functionA will be remove after the linker .

If the output file included unused the functionA , it can set the KEEP attribute at .text.functionA .

In SAG ,
exe_region
{
* KEEP (.text.functionA)
}

BTW , print the remove unused function .
http://forum.andestech.com/viewtopic.php?f=23&t=621

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