$ g++ -v -I/usr/local/include tgmp.cc -L/usr/local/lib -l gmpxx -lgmp -Xlinker --verbose Reading specs from /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.3/specs Configured with: ../gcc-3.3/configure --enable-languages=c,c++,objc Thread model: posix gcc version 3.3 /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.3/cc1plus -quiet -v -I/usr/local/inc lude -D__GNUC__=3 -D__GNUC_MINOR__=3 -D__GNUC_PATCHLEVEL__=0 -D_GNU_SOURCE tgmp. cc -D__GNUG__=3 -quiet -dumpbase tgmp.cc -auxbase tgmp -version -o /tmp/cce06kAg .s GNU C++ version 3.3 (i686-pc-linux-gnu) compiled by GNU C version 2.96 20000731 (Red Hat Linux 7.1 2.96-81). GGC heuristics: --param ggc-min-expand=38 --param ggc-min-heapsize=15838 ignoring nonexistent directory "NONE/include" ignoring nonexistent directory "/usr/local/i686-pc-linux-gnu/include" ignoring duplicate directory "/usr/local/include" as it is a non-system directory that duplicates a system directory #include "..." search starts here: #include <...> search starts here: /usr/local/include/c++/3.3 /usr/local/include/c++/3.3/i686-pc-linux-gnu /usr/local/include/c++/3.3/backward /usr/local/include /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.3/include /usr/include End of search list. as --traditional-format -V -Qy -o /tmp/ccVz2K7C.o /tmp/cce06kAg.s GNU assembler version 2.11.90.0.8 (i386-redhat-linux) using BFD version 2.11.90. 0.8 /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.3/collect2 -m elf_i386 -dynamic-link er /lib/ld-linux.so.2 /usr/lib/crt1.o /usr/lib/crti.o /usr/local/lib/gcc-lib/i68 6-pc-linux-gnu/3.3/crtbegin.o -L/usr/local/lib -L/usr/local/lib/gcc-lib/i686-pc- linux-gnu/3.3 -L/usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.3/../../.. /tmp/ccVz2 K7C.o -lgmpxx -lgmp --verbose -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/ local/lib/gcc-lib/i686-pc-linux-gnu/3.3/crtend.o /usr/lib/crtn.o GNU ld version 2.11.90.0.8 (with BFD 2.11.90.0.8) Supported emulations: elf_i386 i386linux elf_i386_glibc21 using internal linker script: ================================================== OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386") OUTPUT_ARCH(i386) ENTRY(_start) SEARCH_DIR(/lib); SEARCH_DIR(/usr/lib); SEARCH_DIR(/usr/local/lib); SEARCH_DIR(/ usr/i386-redhat-linux/lib); /* Do we need any of these for elf? __DYNAMIC = 0; */ SECTIONS { /* Read-only sections, merged into text segment: */ . = 0x08048000 + SIZEOF_HEADERS; .interp : { *(.interp) } .hash : { *(.hash) } .dynsym : { *(.dynsym) } .dynstr : { *(.dynstr) } .gnu.version : { *(.gnu.version) } .gnu.version_d : { *(.gnu.version_d) } .gnu.version_r : { *(.gnu.version_r) } .rel.dyn : { *(.rel.init) *(.rel.text) *(.rel.text.*) *(.rel.gnu.linkonce.t.*) *(.rel.fini) *(.rel.rodata) *(.rel.rodata.*) *(.rel.gnu.linkonce.r.*) *(.rel.data) *(.rel.data.*) *(.rel.gnu.linkonce.d.*) *(.rel.ctors) *(.rel.dtors) *(.rel.got) *(.rel.sdata) *(.rel.sdata.*) *(.rel.gnu.linkonce.s.*) *(.rel.sbss) *(.rel.sbss.*) *(.rel.gnu.linkonce.sb.*) *(.rel.sdata2) *(.rel.sdata2.*) *(.rel.gnu.linkonce.s2.*) *(.rel.sbss2) *(.rel.sbss2.*) *(.rel.gnu.linkonce.sb2.*) *(.rel.bss) *(.rel.bss.*) *(.rel.gnu.linkonce.b.*) } .rela.dyn : { *(.rela.init) *(.rela.text) *(.rela.text.*) *(.rela.gnu.linkonce.t.*) *(.rela.fini) *(.rela.rodata) *(.rela.rodata.*) *(.rela.gnu.linkonce.r.*) *(.rela.data) *(.rela.data.*) *(.rela.gnu.linkonce.d.*) *(.rela.ctors) *(.rela.dtors) *(.rela.got) *(.rela.sdata) *(.rela.sdata.*) *(.rela.gnu.linkonce.s.*) *(.rela.sbss) *(.rela.sbss.*) *(.rela.gnu.linkonce.sb.*) *(.rela.sdata2) *(.rela.sdata2.*) *(.rela.gnu.linkonce.s2.*) *(.rela.sbss2) *(.rela.sbss2.*) *(.rela.gnu.linkonce.sb2.*) *(.rela.bss) *(.rela.bss.*) *(.rela.gnu.linkonce.b.*) } .rel.plt : { *(.rel.plt) } .rela.plt : { *(.rela.plt) } .init : { KEEP (*(.init)) } =0x9090 .plt : { *(.plt) } .text : { *(.text) *(.text.*) *(.stub) /* .gnu.warning sections are handled specially by elf32.em. */ *(.gnu.warning) *(.gnu.linkonce.t.*) } =0x9090 .fini : { KEEP (*(.fini)) } =0x9090 PROVIDE (__etext = .); PROVIDE (_etext = .); PROVIDE (etext = .); .rodata : { *(.rodata) *(.rodata.*) *(.gnu.linkonce.r.*) } .rodata1 : { *(.rodata1) } .sdata2 : { *(.sdata2) *(.sdata2.*) *(.gnu.linkonce.s2.*) } .sbss2 : { *(.sbss2) *(.sbss2.*) *(.gnu.linkonce.sb2.*) } /* Adjust the address for the data segment. We want to adjust up to the same address within the page on the next page up. */ . = ALIGN(0x1000) + (. & (0x1000 - 1)); .data : { *(.data) *(.data.*) *(.gnu.linkonce.d.*) SORT(CONSTRUCTORS) } .data1 : { *(.data1) } .eh_frame : { KEEP (*(.eh_frame)) } .gcc_except_table : { *(.gcc_except_table) } .ctors : { /* gcc uses crtbegin.o to find the start of the constructors, so we make sure it is first. Because this is a wildcard, it doesn't matter if the user does not actually link against crtbegin.o; the linker won't look for a file to match a wildcard. The wildcard also means that it doesn't matter which directory crtbegin.o is in. */ KEEP (*crtbegin.o(.ctors)) /* We don't want to include the .ctor section from from the crtend.o file until after the sorted ctors. The .ctor section from the crtend file contains the end of ctors marker and it must be last */ KEEP (*(EXCLUDE_FILE (*crtend.o ) .ctors)) KEEP (*(SORT(.ctors.*))) KEEP (*(.ctors)) } .dtors : { KEEP (*crtbegin.o(.dtors)) KEEP (*(EXCLUDE_FILE (*crtend.o ) .dtors)) KEEP (*(SORT(.dtors.*))) KEEP (*(.dtors)) } .got : { *(.got.plt) *(.got) } .dynamic : { *(.dynamic) } /* We want the small data sections together, so single-instruction offsets can access them all, and initialized data all before uninitialized, so we can shorten the on-disk segment size. */ .sdata : { *(.sdata) *(.sdata.*) *(.gnu.linkonce.s.*) } _edata = .; PROVIDE (edata = .); __bss_start = .; .sbss : { PROVIDE (__sbss_start = .); PROVIDE (___sbss_start = .); *(.dynsbss) *(.sbss) *(.sbss.*) *(.gnu.linkonce.sb.*) *(.scommon) PROVIDE (__sbss_end = .); PROVIDE (___sbss_end = .); } .bss : .dynamic : { *(.dynamic) } /* We want the small data sections together, so single-instruction offsets can access them all, and initialized data all before uninitialized, so we can shorten the on-disk segment size. */ .sdata : { *(.sdata) *(.sdata.*) *(.gnu.linkonce.s.*) } _edata = .; PROVIDE (edata = .); __bss_start = .; .sbss : { PROVIDE (__sbss_start = .); PROVIDE (___sbss_start = .); *(.dynsbss) *(.sbss) *(.sbss.*) *(.gnu.linkonce.sb.*) *(.scommon) PROVIDE (__sbss_end = .); PROVIDE (___sbss_end = .); } .bss : { *(.dynbss) *(.bss) *(.bss.*) *(.gnu.linkonce.b.*) *(COMMON) /* Align here to ensure that the .bss section occupies space up to _end. Align after .bss to ensure correct alignment even if the .bss section disappears because there are no input sections. */ . = ALIGN(32 / 8); } . = ALIGN(32 / 8); _end = .; PROVIDE (end = .); /* Stabs debugging sections. */ .stab 0 : { *(.stab) } .stabstr 0 : { *(.stabstr) } .stab.excl 0 : { *(.stab.excl) } .stab.exclstr 0 : { *(.stab.exclstr) } .stab.index 0 : { *(.stab.index) } .stab.indexstr 0 : { *(.stab.indexstr) } .comment 0 : { *(.comment) } /* DWARF debug sections. Symbols in the DWARF debugging sections are relative to the beginning of the section so we begin them at 0. */ /* DWARF 1 */ .debug 0 : { *(.debug) } .line 0 : { *(.line) } /* GNU DWARF 1 extensions */ .debug_srcinfo 0 : { *(.debug_srcinfo) } .debug_sfnames 0 : { *(.debug_sfnames) } /* DWARF 1.1 and DWARF 2 */ .debug_aranges 0 : { *(.debug_aranges) } .debug_pubnames 0 : { *(.debug_pubnames) } /* DWARF 2 */ .debug_info 0 : { *(.debug_info) *(.gnu.linkonce.wi.*) } .debug_abbrev 0 : { *(.debug_abbrev) } .debug_line 0 : { *(.debug_line) } .debug_frame 0 : { *(.debug_frame) } .debug_str 0 : { *(.debug_str) } .debug_loc 0 : { *(.debug_loc) } .debug_macinfo 0 : { *(.debug_macinfo) } /* SGI/MIPS DWARF 2 extensions */ .debug_weaknames 0 : { *(.debug_weaknames) } .debug_funcnames 0 : { *(.debug_funcnames) } .debug_typenames 0 : { *(.debug_typenames) } .debug_varnames 0 : { *(.debug_varnames) } /* These must appear regardless of . */ } ================================================== attempt to open /usr/lib/crt1.o succeeded /usr/lib/crt1.o attempt to open /usr/lib/crti.o succeeded /usr/lib/crti.o attempt to open /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.3/crtbegin.o succeede d /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.3/crtbegin.o attempt to open /tmp/ccVz2K7C.o succeeded /tmp/ccVz2K7C.o attempt to open /usr/local/lib/libgmpxx.so succeeded -lgmpxx (/usr/local/lib/libgmpxx.so) attempt to open /usr/local/lib/libgmp.so succeeded -lgmp (/usr/local/lib/libgmp.so) attempt to open /usr/local/lib/libstdc++.so succeeded -lstdc++ (/usr/local/lib/libstdc++.so) attempt to open /usr/local/lib/libm.so failed attempt to open /usr/local/lib/libm.a failed attempt to open /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.3/libm.so failed attempt to open /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.3/libm.a failed attempt to open /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.3/../../../libm.so fa iled attempt to open /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.3/../../../libm.a fai led attempt to open /lib/libm.so failed attempt to open /lib/libm.a failed attempt to open /usr/lib/libm.so succeeded -lm (/usr/lib/libm.so) attempt to open /usr/local/lib/libgcc_s.so succeeded -lgcc_s (/usr/local/lib/libgcc_s.so) attempt to open /usr/local/lib/libgcc.so failed attempt to open /usr/local/lib/libgcc.a failed attempt to open /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.3/libgcc.so failed attempt to open /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.3/libgcc.a succeeded attempt to open /usr/local/lib/libc.so fa/usr/local/lib/libgmpxx.so: undefined r eference to `cerr' /usr/local/lib/libgmpxx.so: undefined reference to `endl(ostream &)' /usr/local/lib/libgmpxx.so: undefined reference to `__out_of_range(char const *) ' /usr/local/lib/libgmpxx.so: undefined reference to `istream::get(char &)' /usr/local/lib/libgmpxx.so: undefined reference to `__rethrow' /usr/local/lib/libgmpxx.so: undefined reference to `ostream::operator<<(char con st *)' /usr/local/lib/libgmpxx.so: undefined reference to `terminate(void)' /usr/local/lib/libgmpxx.so: undefined reference to `__length_error(char const *) ' /usr/local/lib/libgmpxx.so: undefined reference to `ostream::write(char const *, int)' /usr/local/lib/libgmpxx.so: undefined reference to `streambuf::sputbackc(char)' iled attempt to open /usr/local/lib/libc.a failed attempt to open /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.3/libc.so failed attempt to open /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.3/libc.a failed attempt to open /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.3/../../../libc.so fa iled attempt to open /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.3/../../../libc.a fai led attempt to open /lib/libc.so failed attempt to open /lib/libc.a failed attempt to open /usr/lib/libc.so succeeded opened script file /usr/lib/libc.so attempt to open /lib/libc.so.6 succeeded /lib/libc.so.6 attempt to open /usr/lib/libc_nonshared.a succeeded attempt to open /usr/local/lib/libgcc_s.so succeeded -lgcc_s (/usr/local/lib/libgcc_s.so) attempt to open /usr/local/lib/libgcc.so failed attempt to open /usr/local/lib/libgcc.a failed attempt to open /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.3/libgcc.so failed attempt to open /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.3/libgcc.a succeeded attempt to open /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.3/crtend.o succeeded /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.3/crtend.o attempt to open /usr/lib/crtn.o succeeded /usr/lib/crtn.o ld-linux.so.2 needed by /lib/libc.so.6 found ld-linux.so.2 at /lib/ld-linux.so.2 collect2: ld returned 1 exit status