[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] xenpaging: correct order of linker options to avoid link errors with recent toolchains


  • To: xen-devel@xxxxxxxxxxxxxxxxxxx
  • From: Olaf Hering <olaf@xxxxxxxxx>
  • Date: Wed, 28 Jul 2010 14:55:17 +0200
  • Delivery-date: Wed, 28 Jul 2010 05:56:47 -0700
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.