Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Feb 1995 09:32:02 +0100 (MET)
From:      Thomas Gellekum <thomas@ghpc8.ihf.rwth-aachen.de>
To:        hackers@FreeBSD.org
Subject:   a.out format?
Message-ID:  <199502210832.JAA01808@ghpc6.ihf.rwth-aachen.de>

next in thread | raw e-mail | index | archive | help
Moin moin,

while porting elk I'm having problems with the `dump' primitive.
Dumping itself does work, the header looks OK (same text offset,
text address, entry point for the original and the dumped file,
different data size) but the new file just hangs when I run it.
Since I'm not familiar with the file layout I don't know whether it
is a problem in elk or in the configuration.

The config currently looks like this:

    # These four variables are only relevant if the system has the BSD-style
    # a.out format.
    # segment_size is the segment size of the system's memory management
    # unit, i.e. the number to a multiple of which the size of an a.out
    # segment (e.g. .text) is rounded up.
    # file_text_start is the file offset at which the text segment starts
    # in an a.out file.
    # mem_text_start is the starting address of the text segment in memory.
    # text_length_adj must be set to "sizeof (struct exec)" if the length of
    # the text segment stored in the a.out header includes the a.out header
    # itself.

    segment_size=__LDPGSZ
    file_text_start='(sizeof(struct exec))'
    mem_text_start='(N_TXTADDR(hdr))'
    text_length_adj='(sizeof(struct exec))'

I'm only guessing about N_TXTADDR, it's not documented in the man
page.  The values for 386BSD (or an early FreeBSD) are
segment_size=4096, file_text_start=4096, mem_text_start=0,
text_length_adj=0; they come from elk's author.

Thanks for any help.

tg



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199502210832.JAA01808>