|
发表于 2005-9-22 22:13:02
|
显示全部楼层
我使用MLB3,在用gdb时老是报下面的错,不知为什么?请帮忙看一下,先谢了
root@MagicLinux linux-programming-by-example]# gdb -q p29
BFD: /home/prog-test/linux-programming-by-example/p29(.rel.plt): relocation 0 has invalid symbol index 1
BFD: /home/prog-test/linux-programming-by-example/p29(.rel.plt): relocation 1 has invalid symbol index 3
BFD: /home/prog-test/linux-programming-by-example/p29(.rel.plt): relocation 2 has invalid symbol index 4
BFD: /home/prog-test/linux-programming-by-example/p29(.rel.plt): relocation 3 has invalid symbol index 5
Using host libthread_db library "/lib/tls/libthread_db.so.1".
(gdb) break 6
Breakpoint 1 at 0x8048427: file p29.c, line 6.
(gdb) run
Starting program: /home/prog-test/linux-programming-by-example/p29
Reading symbols from shared object read from target memory...done.
Loaded system supplied DSO at 0xffffe000
BFD: /lib/tls/libc.so.6(.rel.plt): relocation 0 has invalid symbol index 50
BFD: /lib/tls/libc.so.6(.rel.plt): relocation 1 has invalid symbol index 493
BFD: /lib/tls/libc.so.6(.rel.plt): relocation 2 has invalid symbol index 578
BFD: /lib/tls/libc.so.6(.rel.plt): relocation 3 has invalid symbol index 777
BFD: /lib/tls/libc.so.6(.rel.plt): relocation 4 has invalid symbol index 835
BFD: /lib/tls/libc.so.6(.rel.plt): relocation 5 has invalid symbol index 893
BFD: /lib/tls/libc.so.6(.rel.plt): relocation 6 has invalid symbol index 1184
BFD: /lib/tls/libc.so.6(.rel.plt): relocation 7 has invalid symbol index 1537
BFD: /lib/tls/libc.so.6(.rel.plt): relocation 8 has invalid symbol index 1653
BFD: /lib/tls/libc.so.6(.rel.plt): relocation 9 has invalid symbol index 2135
BFD: /lib/ld-linux.so.2(.rel.plt): relocation 0 has invalid symbol index 13
BFD: /lib/ld-linux.so.2(.rel.plt): relocation 1 has invalid symbol index 14
BFD: /lib/ld-linux.so.2(.rel.plt): relocation 2 has invalid symbol index 20
BFD: /lib/ld-linux.so.2(.rel.plt): relocation 3 has invalid symbol index 27
BFD: /lib/ld-linux.so.2(.rel.plt): relocation 4 has invalid symbol index 36
Breakpoint 1, main (argc=1, argv=0xbff2cb64) at p29.c:6
6 if(argc>1 && argv[1][0]=='-' && argv[1][1]=='n')
(gdb) l
1 #include<stdio.h>
2 int main(int argc,char **argv)
3 {
4 register int i,nflg;
5 nflg=0;
6 if(argc>1 && argv[1][0]=='-' && argv[1][1]=='n')
7 { nflg++;
8 argc--;
9 argv++;
10 }
(gdb) |
|