Topic
  • No replies
SystemAdmin
SystemAdmin
549 Posts

Pinned topic Linker error when compiling application with objcopy wrapped files

‏2011-09-30T18:22:52Z |
Hi All,

I am trying to compile an open source project called Shell In A Box on AIX. The project is designed to provide a Web based terminal emulator via AJAX. As part of the build process, a number of HTML, Javascript, and CSS resource files are wrapped in a COFF object file using objcopy. For example, the root HTML page is wrapped into an object file using the following statement:

objcopy -I binary -O aixcoff-rs6000 -B power -N _binary_shellinabox_root_page_html_size
--redefine-sym _binary_shellinabox_root_page_html_start=rootPageStart
--redefine-sym _binary_shellinabox_root_page_html_end=rootPageEnd
shellinabox/root_page.html shellinabox/root_page.o

This creates an AIX COFF object file that has a .data section containing the text of the HTML page. The start and end addresses are exported from the object as rootPageStart and rootPageEnd (via the --redefine-sym flag) and can be verified by viewing the contents of the object file in vim.

Unfortunately, when the makefile attempts to link the object files created by objcopy with the object files created by the assembler, the linker has the following errors:

ld: 0711-562 SEVERE ERROR: Symbol table entry 0 in object shellinabox/root_page.o:
An auxiliary symbol table entry is required for a
C_EXT or C_HIDEXT entry.
ld: 0711-562 SEVERE ERROR: Symbol table entry 1 in object shellinabox/root_page.o:
An auxiliary symbol table entry is required for a
C_EXT or C_HIDEXT entry.

Every other resource object file built by objcopy also has these errors.

Does anyone else have this issue? Is this problem due to the AIX linker or objcopy? Does anyone know of a workaround?

Regards,

Mike