Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.arch.embedded > #31024
| From | Tauno Voipio <tauno.voipio@notused.fi.invalid> |
|---|---|
| Newsgroups | comp.arch.embedded |
| Subject | Re: gcc: NOLOAD and .noinit |
| Date | 2022-03-19 18:57 +0200 |
| Organization | A noiseless patient Spider |
| Message-ID | <t15219$7re$1@dont-email.me> (permalink) |
| References | <t13v61$b72$1@dont-email.me> <j9lu4oFemsdU1@mid.dfncis.de> <t14sp4$i2g$1@dont-email.me> |
On 19.3.22 17.27, pozz wrote:
>
> You're right, .bss has only ALLOC attribute, while .text and .data have
> LOAD attribute too.
>
> It's strange because, as I wrote to David, my linker script doesn't use
> NOLOAD for .bss sections.
Please look at the unlinked .o file of some module accessing the
.bss section. The LOAD attribute is missing there, also.
An example:
tauno@ubuntu:~/sandbox/lm3/app$ arm-none-eabi-objdump -h stest.o
stest.o: file format elf32-littlearm
Sections:
Idx Name Size VMA LMA File off Algn
0 .text 00000000 00000000 00000000 00000034 2**1
CONTENTS, ALLOC, LOAD, READONLY, CODE
1 .data 00000000 00000000 00000000 00000034 2**0
CONTENTS, ALLOC, LOAD, DATA
2 .bss 00001428 00000000 00000000 00000038 2**3
ALLOC
3 .text.boot_thr 00000098 00000000 00000000 00000038 2**2
CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE
4 .text.net_thread 00000004 00000000 00000000 000000d0 2**1
CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE
5 .text.startup.main 0000008c 00000000 00000000 000000d4 2**2
CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE
6 .rodata 00000020 00000000 00000000 00000160 2**2
CONTENTS, ALLOC, LOAD, RELOC, READONLY, DATA
7 .comment 0000005a 00000000 00000000 00000180 2**0
CONTENTS, READONLY
8 .ARM.attributes 0000002d 00000000 00000000 000001da 2**0
CONTENTS, READONLY
It is the assembly phase of the compilation (GNU as) which knows
about the .bss section and leaves the LOAD bit off.
--
-TV
Back to comp.arch.embedded | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
gcc: NOLOAD and .noinit pozz <pozzugno@gmail.com> - 2022-03-19 08:02 +0100
Re: gcc: NOLOAD and .noinit David Brown <david.brown@hesbynett.no> - 2022-03-19 11:33 +0100
Re: gcc: NOLOAD and .noinit pozz <pozzugno@gmail.com> - 2022-03-19 16:20 +0100
Re: gcc: NOLOAD and .noinit David Brown <david.brown@hesbynett.no> - 2022-03-19 16:49 +0100
Re: gcc: NOLOAD and .noinit Hans-Bernhard Bröker <HBBroeker@t-online.de> - 2022-03-19 12:46 +0100
Re: gcc: NOLOAD and .noinit pozz <pozzugno@gmail.com> - 2022-03-19 16:27 +0100
Re: gcc: NOLOAD and .noinit Tauno Voipio <tauno.voipio@notused.fi.invalid> - 2022-03-19 18:57 +0200
Re: gcc: NOLOAD and .noinit kegs@provalid.com (Kent Dickey) - 2022-03-21 04:43 +0000
csiph-web