From: "Stephen Pelc" <stephen@mpeltd.demon.co.uk>
To: linux-assembly@vger.kernel.org
Subject: Re: new behavior with kernels 2.6.10+
Date: Mon, 4 Jul 2005 00:30:02 +0100 [thread overview]
Message-ID: <42C8830A.14199.AAC6681@localhost> (raw)
In-Reply-To: <42C7F316.9040205@comcast.net>
> Doesn't appear to have a writeable section at all. But "objdump
> -h" says:
>
> Sections:
> Idx Name Size VMA LMA File off Algn
> 0 .text 0000000c 00000000 00000000 00000034 2**2
> CONTENTS, ALLOC, LOAD, READONLY, CODE
> 1 .data 00000000 00000000 00000000 00000040 2**2
> CONTENTS, ALLOC, LOAD, DATA
> 2 .bss 00000000 00000000 00000000 00000040 2**2
> ALLOC
I don't know if this is relevant, but under Suse 9.2 an
executable program does not require any sections at all!
Providing that your code (text) segment is marked as writable,
everything is fine. Since an ELF file can be marked as RWX, my
tests using Nasm producing a binary file, and constructing the
ELF headers by hand, I can produce an ELF file that has three
segments (interp, text, dynamic) that loads libc and calls
printf.
According to a contact, the library loader does not require
sections at all. Sections are only required by the the system
linker, usually ld.
Stephen
--
Stephen Pelc, stephen@mpeltd.demon.co.uk
MicroProcessor Engineering Ltd - More Real, Less Time
133 Hill Lane, Southampton SO15 5AF, England
tel: +44 23 80 631441, fax: +44 23 80 339691
web: http://www.mpeltd.demon.co.uk - free VFX Forth downloads
prev parent reply other threads:[~2005-07-03 23:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <070320050307.12502.42C75678000A24E5000030D62205884484C0CF9D0A0B0E0AAD0A08AB@comcast.net>
2005-07-03 14:15 ` new behavior with kernels 2.6.10+ Frank Kotler
2005-07-03 23:30 ` Stephen Pelc [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=42C8830A.14199.AAC6681@localhost \
--to=stephen@mpeltd.demon.co.uk \
--cc=linux-assembly@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).