mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-06 07:28:44 +08:00
2003-09-29 H.J. Lu <hongjiu.lu@intel.com>
* readelf.c (dump_relocations): Support SHN_IA_64_ANSI_COMMON. (get_symbol_index_type): Likewise. testsuites/ 2003-09-29 H.J. Lu <hongjiu.lu@intel.com> * binutils-all/readelf.exp: Use is_elf_format. * binutils-all/readelf.h: Support IA64/ILP32. * binutils-all/readelf.s: Likewise. * binutils-all/readelf.ss: Likewise. * lib/utils-lib.exp (proc is_elf_format): Copy from ld testsuite. Add ia64-*-hpux*.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2003-09-29 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
|
* readelf.c (dump_relocations): Support SHN_IA_64_ANSI_COMMON.
|
||||||
|
(get_symbol_index_type): Likewise.
|
||||||
|
|
||||||
2003-09-25 H.J. Lu <hongjiu.lu@intel.com>
|
2003-09-25 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
* readelf.c (process_version_sections): Indent version names.
|
* readelf.c (process_version_sections): Indent version names.
|
||||||
|
@ -1194,6 +1194,10 @@ dump_relocations (FILE *file,
|
|||||||
sec_name = "ABS";
|
sec_name = "ABS";
|
||||||
else if (psym->st_shndx == SHN_COMMON)
|
else if (psym->st_shndx == SHN_COMMON)
|
||||||
sec_name = "COMMON";
|
sec_name = "COMMON";
|
||||||
|
else if (elf_header.e_machine == EM_IA_64
|
||||||
|
&& elf_header.e_ident[EI_OSABI] == ELFOSABI_HPUX
|
||||||
|
&& psym->st_shndx == SHN_IA_64_ANSI_COMMON)
|
||||||
|
sec_name = "ANSI_COM";
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
sprintf (name_buf, "<section 0x%x>",
|
sprintf (name_buf, "<section 0x%x>",
|
||||||
@ -5550,7 +5554,11 @@ get_symbol_index_type (unsigned int type)
|
|||||||
case SHN_ABS: return "ABS";
|
case SHN_ABS: return "ABS";
|
||||||
case SHN_COMMON: return "COM";
|
case SHN_COMMON: return "COM";
|
||||||
default:
|
default:
|
||||||
if (type >= SHN_LOPROC && type <= SHN_HIPROC)
|
if (type == SHN_IA_64_ANSI_COMMON
|
||||||
|
&& elf_header.e_machine == EM_IA_64
|
||||||
|
&& elf_header.e_ident[EI_OSABI] == ELFOSABI_HPUX)
|
||||||
|
return "ANSI_COM";
|
||||||
|
else if (type >= SHN_LOPROC && type <= SHN_HIPROC)
|
||||||
sprintf (buff, "PRC[0x%04x]", type);
|
sprintf (buff, "PRC[0x%04x]", type);
|
||||||
else if (type >= SHN_LOOS && type <= SHN_HIOS)
|
else if (type >= SHN_LOOS && type <= SHN_HIOS)
|
||||||
sprintf (buff, "OS [0x%04x]", type);
|
sprintf (buff, "OS [0x%04x]", type);
|
||||||
|
@ -1,3 +1,14 @@
|
|||||||
|
2003-09-29 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
|
* binutils-all/readelf.exp: Use is_elf_format.
|
||||||
|
|
||||||
|
* binutils-all/readelf.h: Support IA64/ILP32.
|
||||||
|
* binutils-all/readelf.s: Likewise.
|
||||||
|
* binutils-all/readelf.ss: Likewise.
|
||||||
|
|
||||||
|
* lib/utils-lib.exp (proc is_elf_format): Copy from ld
|
||||||
|
testsuite. Add ia64-*-hpux*.
|
||||||
|
|
||||||
2003-06-29 Danny Smith <dannysmith@users.sourceforge.net>
|
2003-06-29 Danny Smith <dannysmith@users.sourceforge.net>
|
||||||
|
|
||||||
* binutils-all/objcopy.exp: Initialise $test_prog to
|
* binutils-all/objcopy.exp: Initialise $test_prog to
|
||||||
|
@ -303,25 +303,8 @@ proc readelf_wi_test {} {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# Only ELF based toolchains need readelf.
|
# Exclude non-ELF targets.
|
||||||
# For now be paranoid and assume that if ELF is not mentioned
|
if ![is_elf_format] {
|
||||||
# in the target string, then the target is not an ELF based port.
|
|
||||||
|
|
||||||
if { ![istarget *-*-elf*] \
|
|
||||||
&& ![istarget *-*-linux*] \
|
|
||||||
&& ![istarget i?86-*-sysv4*] \
|
|
||||||
&& ![istarget i?86-*-unixware] \
|
|
||||||
&& ![istarget mips*-*-irix5*] \
|
|
||||||
&& ![istarget mips*-*-irix6*] \
|
|
||||||
&& ![istarget powerpc-*-sysv4*] \
|
|
||||||
&& ![istarget powerpc-*-eabi*] \
|
|
||||||
&& ![istarget sparc*-*-solaris2*] } {
|
|
||||||
verbose "$READELF is only intended for ELF targets" 2
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
if { [istarget *-*-linux*oldld*] \
|
|
||||||
|| [istarget *-*-linux*aout*] } {
|
|
||||||
verbose "$READELF is only intended for ELF targets" 2
|
verbose "$READELF is only intended for ELF targets" 2
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
ELF Header:
|
ELF Header:
|
||||||
Magic: 7f 45 4c 46 0[12] 0[12] 01 .. 00 00 00 00 00 00 00 00
|
Magic: 7f 45 4c 46 0[12] 0[12] 01 .. .. 00 00 00 00 00 00 00
|
||||||
Class: ELF[36][24]
|
Class: ELF[36][24]
|
||||||
Data: 2's complement,.* endian
|
Data: 2's complement,.* endian
|
||||||
Version: 1 \(current\)
|
Version: 1 \(current\)
|
||||||
|
@ -4,13 +4,13 @@ Section Headers:
|
|||||||
\[Nr\] Name Type Addr Off Size ES Flg Lk Inf Al
|
\[Nr\] Name Type Addr Off Size ES Flg Lk Inf Al
|
||||||
\[ 0\] NULL 00000000 000000 000000 00 +0 +0 +0
|
\[ 0\] NULL 00000000 000000 000000 00 +0 +0 +0
|
||||||
# On the normal MIPS systems, sections must be aligned to 16 byte
|
# On the normal MIPS systems, sections must be aligned to 16 byte
|
||||||
# boundaries.
|
# boundaries. On IA64, text sections are aligned to 16 byte boundaries.
|
||||||
\[ 1\] .text PROGBITS 00000000 0000(34|40) 0000(08|10) 00 +AX +0 +0 +(.|..)
|
\[ 1\] .text PROGBITS 00000000 0000(34|40) 0000(08|10) 00 +AX +0 +0 +(.|..)
|
||||||
\[ 2\] .rel.+text +REL. +0+ 0+.* 00000. 0. +. +1 +4
|
\[ 2\] .rel.+text +REL. +0+ 0+.* 00000. 0. +. +1 +4
|
||||||
# MIPS targets put .rela.text here.
|
# MIPS targets put .rela.text here.
|
||||||
#...
|
#...
|
||||||
\[ .\] .data PROGBITS 00000000 0000(3c|50) 0000(04|10) 00 WA +0 +0 +(.|..)
|
\[ .\] .data PROGBITS 00000000 0000(3c|48|50) 0000(04|10) 00 WA +0 +0 +(.|..)
|
||||||
\[ .\] .bss NOBITS 00000000 0000(4|6)0 000000 00 WA +0 +0 +(.|..)
|
\[ .\] .bss NOBITS 00000000 0000(40|4c|60) 000000 00 WA +0 +0 +(.|..)
|
||||||
# MIPS targets put .reginfo and .mdebug here.
|
# MIPS targets put .reginfo and .mdebug here.
|
||||||
# v850 targets put .call_table_data and .call_table_text here.
|
# v850 targets put .call_table_data and .call_table_text here.
|
||||||
#...
|
#...
|
||||||
|
@ -13,4 +13,4 @@ Symbol table '.symtab' contains .* entries:
|
|||||||
.* .: 00000000 0 NOTYPE GLOBAL DEFAULT 1 text_symbol
|
.* .: 00000000 0 NOTYPE GLOBAL DEFAULT 1 text_symbol
|
||||||
.: 00000000 0 NOTYPE GLOBAL DEFAULT UND external_symbol
|
.: 00000000 0 NOTYPE GLOBAL DEFAULT UND external_symbol
|
||||||
..: 00000000 0 NOTYPE GLOBAL DEFAULT 3 data_symbol
|
..: 00000000 0 NOTYPE GLOBAL DEFAULT 3 data_symbol
|
||||||
..: 00000004 4 OBJECT GLOBAL DEFAULT COM common_symbol
|
..: 00000004 4 OBJECT GLOBAL DEFAULT ( COM|ANSI_COM) common_symbol
|
||||||
|
@ -111,3 +111,41 @@ proc default_binutils_assemble { source object } {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# is_elf_format
|
||||||
|
# true if the object format is known to be ELF
|
||||||
|
#
|
||||||
|
proc is_elf_format {} {
|
||||||
|
if { ![istarget *-*-sysv4*] \
|
||||||
|
&& ![istarget *-*-unixware*] \
|
||||||
|
&& ![istarget *-*-elf*] \
|
||||||
|
&& ![istarget *-*-eabi*] \
|
||||||
|
&& ![istarget hppa*64*-*-hpux*] \
|
||||||
|
&& ![istarget ia64-*-hpux*] \
|
||||||
|
&& ![istarget *-*-linux*] \
|
||||||
|
&& ![istarget *-*-irix5*] \
|
||||||
|
&& ![istarget *-*-irix6*] \
|
||||||
|
&& ![istarget *-*-netbsd*] \
|
||||||
|
&& ![istarget *-*-solaris2*] } {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
if { [istarget *-*-linux*aout*] \
|
||||||
|
|| [istarget *-*-linux*oldld*] } {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
if { ![istarget *-*-netbsdelf*] \
|
||||||
|
&& ([istarget *-*-netbsd*aout*] \
|
||||||
|
|| [istarget *-*-netbsdpe*] \
|
||||||
|
|| [istarget arm*-*-netbsd*] \
|
||||||
|
|| [istarget sparc-*-netbsd*] \
|
||||||
|
|| [istarget i*86-*-netbsd*] \
|
||||||
|
|| [istarget m68*-*-netbsd*] \
|
||||||
|
|| [istarget vax-*-netbsd*] \
|
||||||
|
|| [istarget ns32k-*-netbsd*]) } {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user