- printf_filtered ("add symbol table from file \"%s\" at\n", name);
- for (i = 0; i < option_index; i++)
- {
- switch (opt[i].type)
- {
- case OPT_SECTION:
- {
- CORE_ADDR addr;
- char *val = opt[i].value;
- char *sec = opt[i].name;
-
- val = opt[i].value;
- if (val[0] == '0' && val[1] == 'x')
- addr = strtoul (val+2, NULL, 16);
- else
- addr = strtoul (val, NULL, 10);
-
- if (strcmp (sec, ".text") == 0)
- section_addrs.text_addr = addr;
- else if (strcmp (sec, ".data") == 0)
- section_addrs.data_addr = addr;
- else if (strcmp (sec, ".bss") == 0)
- section_addrs.bss_addr = addr;
- /* Add the section to the others even if it is a
- text data or bss section. This is redundent but
- eventually, none will be given special treatment */
- {
- section_addrs.other[sec_num].name = strdup (sec);
- make_cleanup (free, section_addrs.other[sec_num].name);
- section_addrs.other[sec_num++].addr = addr;
- printf_filtered ("\t%s_addr = %s\n",
- sec,
- local_hex_string ((unsigned long)addr));
- }
-
- /* The object's sections are initialized when a
- call is made to build_objfile_section_table (objfile).
- This happens in reread_symbols.
- At this point, we don't know what file type this is,
- so we can't determine what section names are valid. */
- }
- break;
- default:
- complain (&unknown_option_complaint, opt[i].name);
- }
- }
- /* Eventually, these hard coded names will be obsolete */
- /* All the addresses will be on the others section */
- }
- else