I compiled a simple hello.c using arm-elf-gcc. The object size is 271639. Here is the layout:
arm-elf-objdump --headers hello
hello: file format elf32-littlearm
Sections:
Idx Name Size VMA LMA File off Algn
0 .text 00008880 00008000 00008000 00008000 2**2
CONTENTS, ALLOC, LOAD, READONLY, CODE
1 .rodata 00000230 00010880 00010880 00010880 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
2 .data 0000085c 00010bb0 00010bb0 00010bb0 2**2
CONTENTS, ALLOC, LOAD, DATA
3 .ctors 00000008 0001140c 0001140c 0001140c 2**2
CONTENTS, ALLOC, LOAD, DATA
4 .dtors 00000008 00011414 00011414 00011414 2**2
CONTENTS, ALLOC, LOAD, DATA
5 .sbss 00000000 0001141c 0001141c 0001141c 2**0
CONTENTS
6 .bss 000000e0 0001141c 0001141c 0001141c 2**2
ALLOC
7 .debug_aranges 00000540 00000000 00000000 0001141c 2**0
CONTENTS, READONLY, DEBUGGING
8 .debug_pubnames 00000af5 00000000 00000000 0001195c 2**0
CONTENTS, READONLY, DEBUGGING
9 .debug_info 00020a0b 00000000 00000000 00012451 2**0
CONTENTS, READONLY, DEBUGGING
10 .debug_abbrev 00003098 00000000 00000000 00032e5c 2**0
CONTENTS, READONLY, DEBUGGING
11 .debug_line 0000a513 00000000 00000000 00035ef4 2**0
CONTENTS, READONLY, DEBUGGING
12 .stack 00000000 00080000 00080000 00040407 2**0
CONTENTS
What’s wrong with this picture? Why is the object file so large?
Thanks.