Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!yale!cmcl2!kramden.acf.nyu.edu!brnstnd From: brnstnd@kramden.acf.nyu.edu (Dan Bernstein) Newsgroups: comp.unix.programmer Subject: Re: ld -A EXAMPLE ! Message-ID: <24292:Sep1123:45:0490@kramden.acf.nyu.edu> Date: 11 Sep 90 23:45:04 GMT References: <9780@discus.technion.ac.il> Organization: IR Lines: 14 In article <9780@discus.technion.ac.il> devil%techunix.bitnet@lilac.berkeley.edu (Gil Tene) writes: [ a program illustrating in detail the use of ld -A ] > I have tested this on a Sun 3 running SunOs 4.0.3 and on a VAX > running BSD. This program DOES NOT work on a sun-4, I have no > idea why, but everyone out there is welcome to fix it up and > let me know what the fix was... Your execx() assumes that arguments are placed onto the stack in a particular way. Move it into the main code, and use a proper execl(), and everything works fine on a Sun 4. Moral: Don't try to imitate varargs manually. ---Dan