wendt@segovia.CS.ColoState.Edu (alan l wendt) (08/22/89)
Unshared programs invariably fail to have enough room. Reproduce by: % cat > foo.c main() { i = 1; } <eof> % cc -N foo.c % a.out will say on our system: Not enough room. uname: HP-UX anon A.B3.10 D 9000/835 15765
frank@zen.co.uk (Frank Wales) (08/23/89)
In article <2450@ccncsu.ColoState.EDU> wendt@segovia.CS.ColoState.Edu (alan l wendt) writes: >Unshared programs invariably fail to have enough room. The manual entry for ld(1), under DEPENDENCIES (series 800) states: "Nonshareable, executable files generated with the -N option cannot be executed via exec(2). Typically, -N is used when rebuilding the kernel." The behaviour of all the shells ("[k]sh: too big", "csh: Not enough room") is correct under this constraint, although why placing the program data immediately after the text causes errno to be set to E2BIG I don't know. In any event, it is not a bug. -- Frank Wales, Systems Manager, [frank@zen.co.uk<->mcvax!zen.co.uk!frank] Zengrange Ltd., Greenfield Rd., Leeds, ENGLAND, LS9 8DB. (+44) 532 489048 x217
swh@hpcupt1.HP.COM (Steve Harrold) (08/23/89)
Re: Unshared programs fail to have enough room. Poster is having with problem with creating unshareable program files, I do not have a solution but the example is incorrect. It should read: >>> % cat > foo.c >>> main() { int i = 1; } fix-----------^^^ >>> <eof> >>> % cc -N foo.c >>> % a.out My system also says: a.out: Not enough space My system is: HP-UX hpcupt1 A.B3.10 C 9000/840 5207
rodean@hpfcdc.HP.COM (Bruce Rodean) (08/23/89)
In article <2450@ccncsu.ColoState.EDU> wendt@segovia.CS.ColoState.Edu (alan l wendt) writes: > Unshared programs invariably fail to have enough room. > [simple program which actually had a syntax error deleted] > % cc -N foo.c > % a.out > > will say on our system: Not enough room. The ld(1) manual entry states under the Series 800 dependency section: Nonsharable, executable files generated with the -N option cannot be executed via exec(2). Typically, -N is used when rebuilding the kernel. I will let someone from the language labs explain the reasons for this. Bruce Rodean rodean%hpfclg@hplabs.HP.COM
mar@hpclmar.HP.COM (Michelle Ruscetta) (08/23/89)
> Unshared programs invariably fail to have enough room. > > Reproduce by: < example deleted > > will say on our system: Not enough room. This is not a bug, the -N option cannot be used with exec(2). The man page for ld states that the files resulting from an ld -N link (cc -N compile) are not executable via 'exec'. Non-sharable files are not supported under the standard exec call. The -N is used for special applications -- in particular when building the HPUX kernel. The man page states (under DEPENDENCIES, s800): Nonsharable, executable files generated with the -N option cannot be executed via exec(2). Typically, -N is used when rebuilding the kernel. Another common use for the -N option is when using incremental linking via the linker's -A option. When -N is specified, then the data is placed immediately following the code, which makes it possible to read all of the text and data of the file into memory contiguously.
tomg@hpcvlx.HP.COM (Thomas J. Gilg) (08/24/89)
>> Unshared programs invariably fail to have enough room. >> will say on our system: Not enough room. > This is not a bug, the -N option cannot be used with exec(2). > Non-sharable files are not supported under the standard exec call. > The -N is used for special applications -- in particular when building > the HPUX kernel. Hum, is this lack of support only for the s800's ? The -N option appears to work fine on the s300's. Thomas Gilg tomg@hpcvlx
wendt@segovia.CS.ColoState.Edu (alan l wendt) (08/25/89)
OK, it's not a bug, it's a feature. The manuals certainly don't go out of their way to bring it to my attention. The man page for cc says of -N: "for details and system defaults, see ld(1)". The slight detail that programs compiled with -N won't execute is not mentioned. Neither is this mentioned in the ld(1) entry for -N, which mostly restates the entry in cc(1). You have to read most of the man page for ld(1) to discover this. And the error message that exec returns is: "not enough space", which is not amazingly revealing. Plus, this is a new restriction. It worked at some time in the past, and the Icon distribution uses it for some reason. So I build the Icon distribution using the hp customization package, and two of the four executables tell me: not enough room. The fine print at the bottom of the ld(1) page is not the first place I look for answers. Alan Wendt
mar@hpclmar.HP.COM (Michelle Ruscetta) (08/26/89)
/ hpclmar:comp.sys.hp / tomg@hpcvlx.HP.COM (Thomas J. Gilg) / 9:38 am Aug 24, 1989 / >> Unshared programs invariably fail to have enough room. >> will say on our system: Not enough room. > This is not a bug, the -N option cannot be used with exec(2). > Non-sharable files are not supported under the standard exec call. > The -N is used for special applications -- in particular when building > the HPUX kernel. Hum, is this lack of support only for the s800's ? The -N option appears to work fine on the s300's. Thomas Gilg tomg@hpcvlx ----------