Does libgcc have different versions built for size and speed?
Asked by
john
I just noticed that a small program grew from ~3200 bytes to ~3600 bytes when transitioning from gcc-4.8 to gcc-4.9. It turns out that practically all the extra code came from libgcc. It was __divsi3. Apparently, this routine is coded in C and gcc-4.9 decided to unroll a loop. Hence the dramatic increase in code size.
An extra 400 bytes for integer division routine doesn't sound right. The program in question was being built with -Os. Apparently, -Os does not have any influence on libgcc, or does it?
CFLAGS=-mthumb -mcpu=cortex-m0 -fno-strict-
LDFLAGS=-T stm32f051.ld -Wl,--gc-sections -fwhole-program -static --specs=nano.specs -lc -lm -lnosys
Question information
- Language:
- English Edit question
- Status:
- Solved
- Assignee:
- No assignee Edit question
- Solved by:
- Thomas Preud'homme
- Solved:
- Last query:
- Last reply:
To post a message you must log in.