syms.c (104834) | syms.c (107492) |
---|---|
1/* Generic symbol-table support for the BFD library. 2 Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 3 2000, 2001, 2002 4 Free Software Foundation, Inc. 5 Written by Cygnus Support. 6 7This file is part of BFD, the Binary File Descriptor library. 8 --- 699 unchanged lines hidden (view full) --- 708SYNOPSIS 709 boolean bfd_is_undefined_symclass (int symclass); 710*/ 711 712boolean 713bfd_is_undefined_symclass (symclass) 714 int symclass; 715{ | 1/* Generic symbol-table support for the BFD library. 2 Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 3 2000, 2001, 2002 4 Free Software Foundation, Inc. 5 Written by Cygnus Support. 6 7This file is part of BFD, the Binary File Descriptor library. 8 --- 699 unchanged lines hidden (view full) --- 708SYNOPSIS 709 boolean bfd_is_undefined_symclass (int symclass); 710*/ 711 712boolean 713bfd_is_undefined_symclass (symclass) 714 int symclass; 715{ |
716 return symclass == 'U' || symclass == 'w' || symclass == 'v'; | 716 return (boolean) (symclass == 'U' || symclass == 'w' || symclass == 'v'); |
717} 718 719/* 720FUNCTION 721 bfd_symbol_info 722 723DESCRIPTION 724 Fill in the basic info about symbol that nm needs. --- 339 unchanged lines hidden (view full) --- 1064 VM address. Do this in two passes: once to count how many 1065 table entries we'll need, and a second to actually build the 1066 table. */ 1067 1068 info->indextablesize = 0; 1069 saw_fun = 1; 1070 for (stab = info->stabs; stab < info->stabs + stabsize; stab += STABSIZE) 1071 { | 717} 718 719/* 720FUNCTION 721 bfd_symbol_info 722 723DESCRIPTION 724 Fill in the basic info about symbol that nm needs. --- 339 unchanged lines hidden (view full) --- 1064 VM address. Do this in two passes: once to count how many 1065 table entries we'll need, and a second to actually build the 1066 table. */ 1067 1068 info->indextablesize = 0; 1069 saw_fun = 1; 1070 for (stab = info->stabs; stab < info->stabs + stabsize; stab += STABSIZE) 1071 { |
1072 if (stab[TYPEOFF] == N_SO) | 1072 if (stab[TYPEOFF] == (bfd_byte) N_SO) |
1073 { 1074 /* N_SO with null name indicates EOF */ 1075 if (bfd_get_32 (abfd, stab + STRDXOFF) == 0) 1076 continue; 1077 1078 /* if we did not see a function def, leave space for one. */ 1079 if (saw_fun == 0) 1080 ++info->indextablesize; 1081 1082 saw_fun = 0; 1083 1084 /* two N_SO's in a row is a filename and directory. Skip */ 1085 if (stab + STABSIZE < info->stabs + stabsize | 1073 { 1074 /* N_SO with null name indicates EOF */ 1075 if (bfd_get_32 (abfd, stab + STRDXOFF) == 0) 1076 continue; 1077 1078 /* if we did not see a function def, leave space for one. */ 1079 if (saw_fun == 0) 1080 ++info->indextablesize; 1081 1082 saw_fun = 0; 1083 1084 /* two N_SO's in a row is a filename and directory. Skip */ 1085 if (stab + STABSIZE < info->stabs + stabsize |
1086 && *(stab + STABSIZE + TYPEOFF) == N_SO) | 1086 && *(stab + STABSIZE + TYPEOFF) == (bfd_byte) N_SO) |
1087 { 1088 stab += STABSIZE; 1089 } 1090 } | 1087 { 1088 stab += STABSIZE; 1089 } 1090 } |
1091 else if (stab[TYPEOFF] == N_FUN) | 1091 else if (stab[TYPEOFF] == (bfd_byte) N_FUN) |
1092 { 1093 saw_fun = 1; 1094 ++info->indextablesize; 1095 } 1096 } 1097 1098 if (saw_fun == 0) 1099 ++info->indextablesize; --- 52 unchanged lines hidden (view full) --- 1152 directory_name = NULL; 1153 file_name = NULL; 1154 saw_fun = 1; 1155 } 1156 else 1157 { 1158 last_stab = stab; 1159 if (stab + STABSIZE >= info->stabs + stabsize | 1092 { 1093 saw_fun = 1; 1094 ++info->indextablesize; 1095 } 1096 } 1097 1098 if (saw_fun == 0) 1099 ++info->indextablesize; --- 52 unchanged lines hidden (view full) --- 1152 directory_name = NULL; 1153 file_name = NULL; 1154 saw_fun = 1; 1155 } 1156 else 1157 { 1158 last_stab = stab; 1159 if (stab + STABSIZE >= info->stabs + stabsize |
1160 || *(stab + STABSIZE + TYPEOFF) != N_SO) | 1160 || *(stab + STABSIZE + TYPEOFF) != (bfd_byte) N_SO) |
1161 { 1162 directory_name = NULL; 1163 } 1164 else 1165 { 1166 /* Two consecutive N_SOs are a directory and a 1167 file name. */ 1168 stab += STABSIZE; --- 219 unchanged lines hidden --- | 1161 { 1162 directory_name = NULL; 1163 } 1164 else 1165 { 1166 /* Two consecutive N_SOs are a directory and a 1167 file name. */ 1168 stab += STABSIZE; --- 219 unchanged lines hidden --- |