Is it possible to enable data sections and function sections without explicitly giving flags "-fdata-sections" and "-ffunction-sections"?

2023-03-19 Thread 3119369616.qq via Gcc
To divide functions into sections and then remove unused sections, I must provide flags "-fdata-sections" and "-ffunction-sections" in GCC and a flag "--gc-sections" in LD. Most of the build systems don't support these flags so GCC will generate bigger binaries. Is it possible to enable this fea

Re: Is it possible to enable data sections and function sections without explicitly giving flags "-fdata-sections" and "-ffunction-sections"?

2023-03-19 Thread Arsen Arsenović via Gcc
"3119369616.qq via Gcc" writes: > To divide functions into sections and then remove unused sections, I must > provide flags "-fdata-sections" and "-ffunction-sections" in GCC and a flag > "--gc-sections" in LD. Most of the build systems don't support these flags so > GCC will generate bigger bin

Re: Is it possible to enable data sections and function sections without explicitly giving flags "-fdata-sections" and "-ffunction-sections"?

2023-03-19 Thread David Brown
On 19/03/2023 13:38, 3119369616.qq via Gcc wrote: To divide functions into sections and then remove unused sections, I must provide flags "-fdata-sections" and "-ffunction-sections" in GCC and a flag "--gc-sections" in LD. Most of the build systems don't support these flags so GCC will generate b

gcc-13-20230319 is now available

2023-03-19 Thread GCC Administrator via Gcc
Snapshot gcc-13-20230319 is now available on https://gcc.gnu.org/pub/gcc/snapshots/13-20230319/ and on various mirrors, see http://gcc.gnu.org/mirrors.html for details. This snapshot has been generated from the GCC 13 git branch with the following options: git://gcc.gnu.org/git/gcc.git branch