Unix PC ".lib" section (Was Re: UNIXpc per-process VM limit)

Mike "Ford" Ditto ford at elgar.UUCP
Fri Jun 17 17:05:57 AEST 1988


In article <104 at tarkus.UUCP> jcs at tarkus.UUCP (John C. Sucilla) writes:
>In article <179 at elgar.UUCP> ford at kenobi.UUCP (Mike "Ford" Ditto) writes:
>>So, evidently, the kernel just looks at the number of sections to
>>decide whether to use the shared library or not.
>
>This can't be entirely true because it's possible to create an optional
>header which would give you yet another section and if you retained relocation
>info in the output file you have still another valid section.

No, the optional header and symbol information are not "sections" in
the coff file.  The optional header is always present in a.out files,
relocation info never is; the symbol information (if present) is never
looked at by the kernel.

>All you accomplished by doing this is losing the addresses that the .lib
>section supplied. In fact, you can create as many sections as you want until
>you hit the limit (12, I believe) in the kernel.

There are no useful addresses in the .lib section header.  It only
contains the address of the first location past the end of the bss
section, which is where the data for the .lib section would be if
there were any.

I haven't tried execing an a.out with any non-standard sections, but
I'd bet that it either wouldn't load or that the (nscns>3) would just
cause the shared library to be used.

					-=] Ford [=-

"Once there were parking lots,		(In Real Life:  Mike Ditto)
now it's a peaceful oasis.		ford at kenobi.cts.com
This was a Pizza Hut,			...!sdcsvax!crash!kenobi!ford
now it's all covered with daisies." -- Talking Heads



More information about the Comp.sys.att mailing list