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

Re: OT:Cross-compiling



Jeff writes:

> >What does line 114 look like in this file?

> {
> (114)  KEEP (*crtbegin.o(.dtors))
>    KEEP (*(EXCLUDE_FILE (*crtend.o ) .dtors))

> /usr/local/lib/gcc-lib/i386-linux/3.2.2/libgcc.a(unwind-dw2-fde-glibc.o):
> In function `size_of_encoded_value':/home/jeff/gcc-3.2.2/gcc/unwind-pe.h:76: 
> undefined reference to `abort'

  It looks like an error when it was making the file (or else it has
error messages embedded in it); specifically, unwind-dw2-fde-glibc.o
references the abort function but it was not resolved.

  Take a look at unwind-pe.h line 76.

Consider the error messages of:

#include <stdio.h>

extern int x;

int main(int argc, char * argv[]) {

  if(argc == 2) {
    x = 2;
  }
  return 0;
}

$ gcc test.c 
/tmp/ccNyp4FK.o: In function `main':
/tmp/ccNyp4FK.o(.text+0x22): undefined reference to `x'
/tmp/ccNyp4FK.o(.text+0x2a): undefined reference to `x'
collect2: ld returned 1 exit status
$

Elizabeth



Reply to: