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

John C. Sucilla jcs at tarkus.UUCP
Tue Jun 14 10:30:47 AEST 1988


In article <179 at elgar.UUCP> ford at kenobi.UUCP (Mike "Ford" Ditto) writes:
>In article <1006 at umbc3.UMD.EDU> alex at umbc3.UMD.EDU (Alex S. Crain) writes:
>>	The .lib section is an illusion, because its always empty in loaded
>I just tried it, it's easy with Emacs.  I just renamed the .lib section
>and it still worked.  I had to delete the section (actually just change
>filehdr.f_nscns from 4 to 3) to make it fail.  Now the program gets
>"Memory fault - core dumped" just because that one byte is changed.
>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.
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.

-- 
John "C". Sucilla,  A silicon based life form.
       {ihnp4,chinet,ddsw1}!tarkus!jcs
  You have a better idea? Now's the time..



More information about the Comp.sys.att mailing list