From owner-freebsd-stable@FreeBSD.ORG Thu Feb 5 14:15:20 2015 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3C117ED6 for ; Thu, 5 Feb 2015 14:15:20 +0000 (UTC) Received: from nmsh4.e.nsc.no (nmsh4.e.nsc.no [193.213.121.75]) by mx1.freebsd.org (Postfix) with ESMTP id 9123119C for ; Thu, 5 Feb 2015 14:15:19 +0000 (UTC) Received: from terraplane.org (ti0027a400-0301.bb.online.no [85.164.8.49]) by nmsh4.nsc.no (8.14.7/8.14.7) with ESMTP id t15DNrQb023878 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Thu, 5 Feb 2015 14:23:54 +0100 (MET) Received: from terraplane.org (localhost [127.0.0.1]) by terraplane.org (8.14.5/8.14.5) with ESMTP id t15DarVp021029 for ; Thu, 5 Feb 2015 14:36:53 +0100 (CET) (envelope-from rumrunner@terraplane.org) Received: (from rumrunner@localhost) by terraplane.org (8.14.5/8.13.8/Submit) id t15DarMm021028 for freebsd-stable@freebsd.org; Thu, 5 Feb 2015 14:36:53 +0100 (CET) (envelope-from rumrunner) Date: Thu, 5 Feb 2015 14:36:53 +0100 From: Eivind Evensen To: freebsd-stable@freebsd.org Subject: Buserror when built on FreeBSD 10, not on FreeBSD 8 Message-ID: <20150205133653.GA16112@klump.hjerdalen.lokalnett> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Feb 2015 14:15:20 -0000 Hello. After upgrading from FreeBSD 8 to 10, I have a problem I don't understand, hopefully somebody here knows what is happening. I have a project that uses both assembly and c. I started getting bus errors after building on FreeBSD 10. I had, and may still have some objects around from FreeBSD 8 and if I link those, on 10, they work. I don't have any installations running 8 any longer though. This is on amd64 platform. I could reduce the problem to the following files. makefile: ----------------------------------------------- ASM ?= yasm .c.o: ${CC} -g -c $< .s.o: ${ASM} -felf64 -gdwarf2 $< prgs: a1 a2 a1: s.o c1.o ${CC} -o$@ $> a2: s.o c2.o ${CC} -o$@ $> clean: rm -f a1 a2 s.o c1.o c2.o ------------------------------------------- s.s: ------------------------------------------- global asmcode extern cagain asmcode: call cagain ret ------------------------------------------- c1.c: ------------------------------------------- #include void asmcode(); void cagain(); int main() { asmcode(); return(0); } void cagain() { printf("doesn't work\n"); } -------------------------------------------- c2.c: -------------------------------------------- #include void asmcode(); void cagain(); int main() { asmcode(); return(0); } void cagain() { puts("works\n"); } --------------------------------------------- Basically, coming back to c-code and calling certain functions, like in this case printf() gives a buserror. Calling puts() on the other hand works, like can be seen by building the above and executing those. Does anybody know what's up? Regards, Eivind N Evensen