* elfload.c (textSectionAddress): Check section table before accessing.
* compLoader.cxx (loader_probe_bus): Initialize section_table.
+2004-04-29 Dave Brolley <brolley@redhat.com>
+
+ * elfload.c (textSectionAddress): Check section table before accessing.
+ * compLoader.cxx (loader_probe_bus): Initialize section_table.
+
2004-02-26 Dave Brolley <brolley@redhat.com>
* elfload.c (textSectionNum): Now file level static.
public:
loader_probe_bus (sid::bus **t, output_pin *p) :
sidutil::passthrough_bus (t),
- write_to_code_address_pin (p)
+ write_to_code_address_pin (p),
+ section_table (0)
{
assert (t);
}
int
textSectionAddress (unsigned long long address, const struct TextSection *section_table)
{
+ // Not a text section address if there is no table.
+ if (! section_table)
+ return 0;
+
/* The table begins with the given pointer and is terminated by an entry with
zeroes for both the high and low bounds. */
int i;