lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <47A8D3CF.2080608@zytor.com>
Date:	Tue, 05 Feb 2008 13:23:27 -0800
From:	"H. Peter Anvin" <hpa@...or.com>
To:	Sam Ravnborg <sam@...nborg.org>
CC:	Ingo Molnar <mingo@...e.hu>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	linux-kernel@...r.kernel.org
Subject: Re: [git pull] x86 updates

Sam Ravnborg wrote:
>>
>> Technically we should also specify @progbits or @nobits on sections, 
>> however, I think @progbits is the default.
> 
> I have on my todo list to do so. But I wanted to investigate a bit
> more since I do not yet fully understand the difference.
> 
> And we have to use %progbits and %nobits as ARM uses '"' to indicate
> comments.
> 

The difference is quite simple:

	a		- this section occupies address space
	w		- this section is writable
	x		- this section is executable
	progbits	- this section has data in the file

In contrast, a nobits section is implicitly zero-filled.

By default:

.bss 	is (aw,nobits).
.data 	is (aw,progbits).
.rodata	is (a,progbits).
.text	is (ax,progbits).

Since .bss is nobits, it doesn't occupy any space in the executable, and 
is zero-filled by the loader.

	-hpa


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ