*BSD News Article 67626


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.bhp.com.au!mel.dit.csiro.au!munnari.OZ.AU!news.ecn.uoknor.edu!news.wildstar.net!serv.hinet.net!nctuccca.edu.tw!howland.reston.ans.net!newsfeed.internetmci.com!news.mathworks.com!fu-berlin.de!zib-berlin.de!news.tu-chemnitz.de!irz401!uriah.heep!news
From: j@uriah.heep.sax.de (J Wunsch)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: gcc and FreeBSD
Date: 3 May 1996 16:58:51 GMT
Organization: Private FreeBSD site, Dresden
Lines: 24
Message-ID: <4mde0b$hqu@uriah.heep.sax.de>
References: <Y6nxBDAlWlhxEwlU@ruthless.demon.co.uk>
Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch)
NNTP-Posting-Host: localhost.heep.sax.de
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Newsreader: knews 0.9.6

Ravi Cheema <ravi@ruthless.demon.co.uk> writes:

>'Exec format error. Wrong Architecture.'
>
>When I do a 'file' on the executable I get the following:
>
>'setuid PDP-11 pure executable not stripped'

You are either suffering from some totally damaged compiler, or you've
created a relocatable object file, chmod'ed it to something like 7777
accidentally, and try to run it now.  You can't make a runnable
executable by chmod'ing it (and you actually did something rather
dangerous by turning on the setuid bit), instead you have to resolve
the relocations by linking the object file with ld(1).

This is normally done by the C compiler, not by explicitly calling ld
directly.

-- 
cheers, J"org

joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)