WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] xenpaging: correct order of linker options to avoid

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] xenpaging: correct order of linker options to avoid link errors with recent toolchains
From: Olaf Hering <olaf@xxxxxxxxx>
Date: Wed, 28 Jul 2010 14:55:17 +0200
Delivery-date: Wed, 28 Jul 2010 05:56:47 -0700
Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; t=1280321718; l=10503; s=domk; d=aepfle.de; h=Content-Type:MIME-Version:Subject:To:From:Date:X-RZG-CLASS-ID: X-RZG-AUTH; bh=v0K/dSnd8vAg6YrQfniX4uL4D68=; b=XGPChhyH+2C8NgFFzZod1izUDUWbpN1wd12h8KjOp1f/Xm2Ga/SE0iXytPxDOCVtzoI 0i7SrV29XodAdq/AIn0PRoqWAVSyidf47SaRpU1cQrbxxCUBdbwiALPv+TweOdMfQHp2/ 4GfylOaPK/XVy5vwwZeDjcExQdHgFke/UmA=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.20 (2009-06-14)
Fix link error in openSuSE 11.2. 
The order of objects and linked libraries is important with recent toolchain
when --as-needed is used.

xc.o: In function `xc_wait_for_event_or_timeout':
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xc.c:80: 
undefined reference to `xc_report_error'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xc.c:86: 
undefined reference to `xc_evtchn_pending'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xc.c:89: 
undefined reference to `xc_report_error'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xc.c:93: 
undefined reference to `xc_evtchn_unmask'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xc.c:96: 
undefined reference to `xc_report_error'
xc.o: In function `xc_mem_paging_flush_ioemu_cache':
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xc.c:57: 
undefined reference to `xs_daemon_open'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xc.c:61: 
undefined reference to `xs_write'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xc.c:63: 
undefined reference to `xs_daemon_close'
xc.o: In function `get_platform_info':
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/../../tools/libxc/xg_save_restore.h:52:
 undefined reference to `xc_version'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/../../tools/libxc/xg_save_restore.h:55:
 undefined reference to `xc_version'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/../../tools/libxc/xg_save_restore.h:58:
 undefined reference to `xc_memory_op'
xc.o: In function `do_domctl':
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/../../tools/libxc/xc_private.h:148:
 undefined reference to `hcall_buf_prep'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/../../tools/libxc/xc_private.h:150:
 undefined reference to `safe_strerror'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/../../tools/libxc/xc_private.h:150:
 undefined reference to `xc_report_error'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/../../tools/libxc/xc_private.h:159:
 undefined reference to `do_xen_hypercall'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/../../tools/libxc/xc_private.h:162:
 undefined reference to `xc_report'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/../../tools/libxc/xc_private.h:166:
 undefined reference to `hcall_buf_release'
xenpaging.o: In function `xenpaging_resume_page':
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:393:
 undefined reference to `xc_mem_paging_resume'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:395:
 undefined reference to `xc_evtchn_notify'
xenpaging.o: In function `xenpaging_evict_page':
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:342:
 undefined reference to `xc_map_foreign_pages'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:346:
 undefined reference to `xc_report_error'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:355:
 undefined reference to `xc_report_error'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:365:
 undefined reference to `xc_mem_paging_evict'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:369:
 undefined reference to `xc_report_error'
xenpaging.o: In function `evict_victim':
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:457:
 undefined reference to `xc_report_error'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:461:
 undefined reference to `xc_mem_paging_nominate'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:469:
 undefined reference to `xc_report_error'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:475:
 undefined reference to `xc_report_error'
xenpaging.o: In function `xenpaging_teardown':
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:244:
 undefined reference to `xc_mem_event_disable'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:247:
 undefined reference to `xc_report_error'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:252:
 undefined reference to `xc_evtchn_unbind'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:255:
 undefined reference to `xc_report_error'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:261:
 undefined reference to `xc_evtchn_close'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:264:
 undefined reference to `xc_report_error'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:270:
 undefined reference to `xc_interface_close'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:273:
 undefined reference to `xc_report_error'
xenpaging.o: In function `xenpaging_init':
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:76:
 undefined reference to `xc_interface_open'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:80:
 undefined reference to `xc_report'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:97:
 undefined reference to `xc_report_error'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:105:
 undefined reference to `xc_report_error'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:119:
 undefined reference to `xc_mem_event_enable'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:125:
 undefined reference to `xc_report_error'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:127:
 undefined reference to `xc_report_error'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:132:
 undefined reference to `xc_evtchn_open'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:135:
 undefined reference to `xc_report_error'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:140:
 undefined reference to `xc_evtchn_bind_interdomain'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:145:
 undefined reference to `xc_report_error'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:155:
 undefined reference to `xc_report_error'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:163:
 undefined reference to `xc_report_error'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:171:
 undefined reference to `xc_report_error'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:175:
 undefined reference to `xc_domain_getinfolist'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:179:
 undefined reference to `xc_report_error'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:190:
 undefined reference to `xc_report_error'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:193:
 undefined reference to `xc_report'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:199:
 undefined reference to `xc_report_error'
xenpaging.o: In function `main':
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:529:
 undefined reference to `xc_report_error'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:539:
 undefined reference to `xc_report'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:542:
 undefined reference to `xc_report'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:551:
 undefined reference to `xc_report_error'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:556:
 undefined reference to `xc_report'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:581:
 undefined reference to `xc_report'
xenpaging.o: In function `xenpaging_populate_page':
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:411:
 undefined reference to `xc_mem_paging_prep'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:415:
 undefined reference to `xc_report_error'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:422:
 undefined reference to `xc_map_foreign_pages'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:427:
 undefined reference to `xc_report_error'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:435:
 undefined reference to `xc_report_error'
xenpaging.o: In function `main':
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:589:
 undefined reference to `xc_report_error'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:602:
 undefined reference to `xc_report_error'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:611:
 undefined reference to `xc_report'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:629:
 undefined reference to `xc_report_error'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:643:
 undefined reference to `xc_report_error'
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/xenpaging.c:648:
 undefined reference to `xc_interface_close'
policy_default.o: In function `policy_choose_victim':
/usr/src/packages/BUILD/xen-unstable.hg-4.1.21864/tools/xenpaging/policy_default.c:64:
 undefined reference to `xc_report'
collect2: ld returned 1 exit status
make[3]: *** [xenpaging] Error 1

Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>

---
 tools/xenpaging/Makefile |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- xen-unstable.hg-4.1.21864.orig/tools/xenpaging/Makefile
+++ xen-unstable.hg-4.1.21864/tools/xenpaging/Makefile
@@ -27,7 +27,7 @@ IBINS    = xenpaging
 all: $(IBINS)
 
 xenpaging: $(OBJS)
-       $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
+       $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
 
 install: all
        $(INSTALL_DIR) $(DESTDIR)$(SBINDIR)

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel