Lines Matching defs:symbol
30 "\t%s [-b|-w|-l] -s symbol[[[index]][=value]] binary\n"
31 "\t%s [-b|-w|-l] [-o offset] -s symbol [-r value] binary\n"
42 "\t-b symbol or address to be patched is 1 byte\n"
43 "\t-l symbol or address to be patched is 4 bytes (default)\n"
44 "\t-o offset to begin patching value relative to symbol or address\n"
46 "\t-s patch variable by specifying symbol name. Use '[]'\n"
50 "\t-w symbol or address to be patched is 2 bytes\n"
81 static u_long FindAssign(char *symbol, u_long *rvalue);
82 static void FindOffset(char *symbol, u_long *index);
102 char *symbol = 0;
123 if (addr || symbol) {
124 error("only one address/symbol allowed");
161 if (addr || symbol) {
162 error("only one address/symbol allowed");
164 symbol = optarg;
182 if (addr || symbol) {
203 if (symbol) {
209 new_do_replace = FindAssign(symbol,
214 FindOffset(symbol, &index);
225 nl[0].n_un.n_name = symbol;
228 fprintf(stderr, "Symbol is %s ",
229 symbol);
230 error("Symbol not found.");
260 error("address/symbol is not in text "
301 if (symbol) {
302 printf("%s(0x%x): %d (0x%x)\n", symbol, addr,
345 /* not (addr || symbol) */
346 error("Must specify either address or symbol.");
385 * embedded in the symbol.
387 * If there is, return it, and truncate symbol to exclude the [...].
400 FindOffset(char *symbol, u_long *index)
403 char *sb = strchr(symbol, '[');
406 char *eb = strchr(symbol, ']');
408 /* symbol size */
409 short sz = strlen(symbol);
413 if ((eb - symbol) == (sz - 1)) {
441 fprintf(stderr, "Error ']' in symbol before '[' !\n");
449 * FindAssign : Scans symbol name for an '=number' strips it off of
450 * the symbol and proceeds.
453 FindAssign(char *symbol, u_long *rvalue)
455 /* Assign symbol some number */
456 char *ce = rindex(symbol, '=');
468 /* get the number to assign to symbol and strip off = */
480 /* Now were left with just symbol */