GNU Binutils with patches for OS216
Revision | 64367e0abc90c1be80214d0983bbce3fa2c052bb (tree) |
---|---|
Zeit | 2000-04-09 07:35:35 |
Autor | Jim Blandy <jimb@code...> |
Commiter | Jim Blandy |
* dwarf2read.c: Revert Andrew Cagney's change of Dec 15, 1997.
Don't include "bfd-elf.h".
(address_significant_size): Delete variable.
(dwarf2_build_psymtabs_hard): Don't set it, or check for
consistency between it and the Dwarf 2 compilation unit header
address size.
(read_address): Don't mask off bits above
address_significant_size.
* Makefile.in (dwarf2read.o): Don't depend on $(elf_bfd_h).
(elf_bfd_h): Remove variable; it's no longer used.
@@ -1,3 +1,16 @@ | ||
1 | +2000-04-08 Jim Blandy <jimb@redhat.com> | |
2 | + | |
3 | + * dwarf2read.c: Revert Andrew Cagney's change of Dec 15, 1997. | |
4 | + Don't include "bfd-elf.h". | |
5 | + (address_significant_size): Delete variable. | |
6 | + (dwarf2_build_psymtabs_hard): Don't set it, or check for | |
7 | + consistency between it and the Dwarf 2 compilation unit header | |
8 | + address size. | |
9 | + (read_address): Don't mask off bits above | |
10 | + address_significant_size. | |
11 | + * Makefile.in (dwarf2read.o): Don't depend on $(elf_bfd_h). | |
12 | + (elf_bfd_h): Remove variable; it's no longer used. | |
13 | + | |
1 | 14 | 2000-04-08 Peter Schauer <pes@regent.e-technik.tu-muenchen.de> |
2 | 15 | |
3 | 16 | * configure.in (NEW_PROC_API): Escape square brackets when testing |
@@ -500,7 +500,6 @@ LINTFILES = $(SFILES) $(YYFILES) $(CONFIG_SRCS) init.c | ||
500 | 500 | getopt_h = $(INCLUDE_DIR)/getopt.h |
501 | 501 | floatformat_h = $(INCLUDE_DIR)/floatformat.h |
502 | 502 | bfd_h = $(BFD_DIR)/bfd.h |
503 | -elf_bfd_h = $(BFD_SRC)/elf-bfd.h | |
504 | 503 | dis-asm_h = $(INCLUDE_DIR)/dis-asm.h |
505 | 504 | remote-sim_h = $(INCLUDE_DIR)/remote-sim.h |
506 | 505 |
@@ -1243,7 +1242,7 @@ dwarfread.o: dwarfread.c $(bfd_h) buildsym.h complaints.h $(defs_h) \ | ||
1243 | 1242 | $(expression_h) $(gdbtypes_h) language.h objfiles.h symfile.h \ |
1244 | 1243 | $(symtab_h) gdb_string.h |
1245 | 1244 | |
1246 | -dwarf2read.o: dwarf2read.c $(bfd_h) $(elf_bfd_h) buildsym.h $(defs_h) \ | |
1245 | +dwarf2read.o: dwarf2read.c $(bfd_h) buildsym.h $(defs_h) \ | |
1247 | 1246 | $(expression_h) $(gdbtypes_h) language.h objfiles.h symfile.h \ |
1248 | 1247 | $(symtab_h) gdb_string.h |
1249 | 1248 |
@@ -27,7 +27,6 @@ | ||
27 | 27 | |
28 | 28 | #include "defs.h" |
29 | 29 | #include "bfd.h" |
30 | -#include "elf-bfd.h" | |
31 | 30 | #include "symtab.h" |
32 | 31 | #include "gdbtypes.h" |
33 | 32 | #include "symfile.h" |
@@ -546,15 +545,6 @@ static struct complaint dwarf2_unsupported_const_value_attr = | ||
546 | 545 | whatever scope is currently getting read. */ |
547 | 546 | static int address_size; |
548 | 547 | |
549 | -/* Some elf32 object file formats while linked for a 32 bit address | |
550 | - space contain debug information that has assumed 64 bit | |
551 | - addresses. Eg 64 bit MIPS target produced by GCC/GAS/LD where the | |
552 | - symbol table contains 32bit address values while its .debug_info | |
553 | - section contains 64 bit address values. | |
554 | - ADDRESS_SIGNIFICANT_SIZE specifies the number significant bits in | |
555 | - the ADDRESS_SIZE bytes read from the file */ | |
556 | -static int address_significant_size; | |
557 | - | |
558 | 548 | /* Externals references. */ |
559 | 549 | extern int info_verbose; /* From main.c; nonzero => verbose */ |
560 | 550 |
@@ -937,9 +927,6 @@ dwarf2_build_psymtabs_hard (objfile, mainline) | ||
937 | 927 | int comp_unit_has_pc_info; |
938 | 928 | CORE_ADDR lowpc, highpc; |
939 | 929 | |
940 | - /* Number of bytes of any addresses that are signficant */ | |
941 | - address_significant_size = get_elf_backend_data (abfd)->s->arch_size / 8; | |
942 | - | |
943 | 930 | info_ptr = dwarf_info_buffer; |
944 | 931 | abbrev_ptr = dwarf_abbrev_buffer; |
945 | 932 |
@@ -980,13 +967,6 @@ dwarf2_build_psymtabs_hard (objfile, mainline) | ||
980 | 967 | (long) (beg_of_comp_unit - dwarf_info_buffer)); |
981 | 968 | return; |
982 | 969 | } |
983 | - if (address_size < address_significant_size) | |
984 | - { | |
985 | - error ("Dwarf Error: bad address size (%ld) in compilation unit header (offset 0x%lx + 11).", | |
986 | - (long) cu_header.addr_size, | |
987 | - (long) (beg_of_comp_unit - dwarf_info_buffer)); | |
988 | - } | |
989 | - | |
990 | 970 | /* Read the abbrevs for this compilation unit into a table */ |
991 | 971 | dwarf2_read_abbrevs (abfd, cu_header.abbrev_offset); |
992 | 972 | make_cleanup (dwarf2_empty_abbrev_table, NULL); |
@@ -3500,17 +3480,8 @@ read_address (abfd, buf) | ||
3500 | 3480 | /* *THE* alternative is 8, right? */ |
3501 | 3481 | abort (); |
3502 | 3482 | } |
3503 | - /* If the address being read is larger than the address that is | |
3504 | - applicable for the object file format then mask it down to the | |
3505 | - correct size. Take care to avoid unnecessary shift or shift | |
3506 | - overflow */ | |
3507 | - if (address_size > address_significant_size | |
3508 | - && address_significant_size < sizeof (CORE_ADDR)) | |
3509 | - { | |
3510 | - CORE_ADDR mask = ((CORE_ADDR) 0) - 1; | |
3511 | - retval &= ~(mask << (address_significant_size * 8)); | |
3512 | - } | |
3513 | - return retval; | |
3483 | + | |
3484 | + return retval; | |
3514 | 3485 | } |
3515 | 3486 | |
3516 | 3487 | static char * |