projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
gas/
[deliverable/binutils-gdb.git]
/
bfd
/
xsym.c
diff --git
a/bfd/xsym.c
b/bfd/xsym.c
index 174fb820ada5ba2f51985c6ffe56bc1ed68345f3..e0819a9b1a8249854c28b8a4893128a978c6e9a8 100644
(file)
--- a/
bfd/xsym.c
+++ b/
bfd/xsym.c
@@
-1,12
+1,12
@@
/* xSYM symbol-file support for BFD.
/* xSYM symbol-file support for BFD.
- Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
- Free Software Foundation, Inc.
+ Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
, 2008,
+
2009, 2010, 2011, 2012
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This file is part of BFD, the Binary File Descriptor library.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version
2
of the License, or
+ the Free Software Foundation; either version
3
of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
(at your option) any later version.
This program is distributed in the hope that it will be useful,
@@
-16,11
+16,15
@@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
+ MA 02110-1301, USA. */
+/* xSYM is the debugging format used by CodeWarrior on Mac OS classic. */
+
+#include "sysdep.h"
+#include "alloca-conf.h"
#include "xsym.h"
#include "bfd.h"
#include "xsym.h"
#include "bfd.h"
-#include "sysdep.h"
#include "libbfd.h"
#define bfd_sym_close_and_cleanup _bfd_generic_close_and_cleanup
#include "libbfd.h"
#define bfd_sym_close_and_cleanup _bfd_generic_close_and_cleanup
@@
-40,14
+44,18
@@
#define bfd_sym_bfd_get_relocated_section_contents bfd_generic_get_relocated_section_contents
#define bfd_sym_bfd_relax_section bfd_generic_relax_section
#define bfd_sym_bfd_gc_sections bfd_generic_gc_sections
#define bfd_sym_bfd_get_relocated_section_contents bfd_generic_get_relocated_section_contents
#define bfd_sym_bfd_relax_section bfd_generic_relax_section
#define bfd_sym_bfd_gc_sections bfd_generic_gc_sections
+#define bfd_sym_bfd_lookup_section_flags bfd_generic_lookup_section_flags
#define bfd_sym_bfd_merge_sections bfd_generic_merge_sections
#define bfd_sym_bfd_is_group_section bfd_generic_is_group_section
#define bfd_sym_bfd_discard_group bfd_generic_discard_group
#define bfd_sym_section_already_linked _bfd_generic_section_already_linked
#define bfd_sym_bfd_merge_sections bfd_generic_merge_sections
#define bfd_sym_bfd_is_group_section bfd_generic_is_group_section
#define bfd_sym_bfd_discard_group bfd_generic_discard_group
#define bfd_sym_section_already_linked _bfd_generic_section_already_linked
+#define bfd_sym_bfd_define_common_symbol bfd_generic_define_common_symbol
#define bfd_sym_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
#define bfd_sym_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
#define bfd_sym_bfd_link_add_symbols _bfd_generic_link_add_symbols
#define bfd_sym_bfd_link_just_syms _bfd_generic_link_just_syms
#define bfd_sym_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
#define bfd_sym_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
#define bfd_sym_bfd_link_add_symbols _bfd_generic_link_add_symbols
#define bfd_sym_bfd_link_just_syms _bfd_generic_link_just_syms
+#define bfd_sym_bfd_copy_link_hash_symbol_type \
+ _bfd_generic_copy_link_hash_symbol_type
#define bfd_sym_bfd_final_link _bfd_generic_final_link
#define bfd_sym_bfd_link_split_section _bfd_generic_link_split_section
#define bfd_sym_get_section_contents_in_window _bfd_generic_get_section_contents_in_window
#define bfd_sym_bfd_final_link _bfd_generic_final_link
#define bfd_sym_bfd_link_split_section _bfd_generic_link_split_section
#define bfd_sym_get_section_contents_in_window _bfd_generic_get_section_contents_in_window
@@
-79,11
+87,11
@@
static unsigned long
compute_offset (unsigned long first_page,
unsigned long page_size,
unsigned long entry_size,
compute_offset (unsigned long first_page,
unsigned long page_size,
unsigned long entry_size,
- unsigned long index)
+ unsigned long
sym_
index)
{
unsigned long entries_per_page = page_size / entry_size;
{
unsigned long entries_per_page = page_size / entry_size;
- unsigned long page_number = first_page + (index / entries_per_page);
- unsigned long page_offset = (index % entries_per_page) * entry_size;
+ unsigned long page_number = first_page + (
sym_
index / entries_per_page);
+ unsigned long page_offset = (
sym_
index % entries_per_page) * entry_size;
return (page_number * page_size) + page_offset;
}
return (page_number * page_size) + page_offset;
}
@@
-525,7
+533,7
@@
bfd_sym_parse_type_table_entry_v32 (unsigned char *buf,
int
bfd_sym_fetch_resources_table_entry (bfd *abfd,
bfd_sym_resources_table_entry *entry,
int
bfd_sym_fetch_resources_table_entry (bfd *abfd,
bfd_sym_resources_table_entry *entry,
- unsigned long index)
+ unsigned long
sym_
index)
{
void (*parser) (unsigned char *, size_t, bfd_sym_resources_table_entry *);
unsigned long offset;
{
void (*parser) (unsigned char *, size_t, bfd_sym_resources_table_entry *);
unsigned long offset;
@@
-537,7
+545,7
@@
bfd_sym_fetch_resources_table_entry (bfd *abfd,
BFD_ASSERT (bfd_sym_valid (abfd));
sdata = abfd->tdata.sym_data;
BFD_ASSERT (bfd_sym_valid (abfd));
sdata = abfd->tdata.sym_data;
- if (index == 0)
+ if (
sym_
index == 0)
return -1;
switch (sdata->version)
return -1;
switch (sdata->version)
@@
-561,7
+569,7
@@
bfd_sym_fetch_resources_table_entry (bfd *abfd,
offset = compute_offset (sdata->header.dshb_rte.dti_first_page,
sdata->header.dshb_page_size,
offset = compute_offset (sdata->header.dshb_rte.dti_first_page,
sdata->header.dshb_page_size,
- entry_size, index);
+ entry_size,
sym_
index);
if (bfd_seek (abfd, offset, SEEK_SET) < 0)
return -1;
if (bfd_seek (abfd, offset, SEEK_SET) < 0)
return -1;
@@
-576,7
+584,7
@@
bfd_sym_fetch_resources_table_entry (bfd *abfd,
int
bfd_sym_fetch_modules_table_entry (bfd *abfd,
bfd_sym_modules_table_entry *entry,
int
bfd_sym_fetch_modules_table_entry (bfd *abfd,
bfd_sym_modules_table_entry *entry,
- unsigned long index)
+ unsigned long
sym_
index)
{
void (*parser) (unsigned char *, size_t, bfd_sym_modules_table_entry *);
unsigned long offset;
{
void (*parser) (unsigned char *, size_t, bfd_sym_modules_table_entry *);
unsigned long offset;
@@
-588,7
+596,7
@@
bfd_sym_fetch_modules_table_entry (bfd *abfd,
BFD_ASSERT (bfd_sym_valid (abfd));
sdata = abfd->tdata.sym_data;
BFD_ASSERT (bfd_sym_valid (abfd));
sdata = abfd->tdata.sym_data;
- if (index == 0)
+ if (
sym_
index == 0)
return -1;
switch (sdata->version)
return -1;
switch (sdata->version)
@@
-612,7
+620,7
@@
bfd_sym_fetch_modules_table_entry (bfd *abfd,
offset = compute_offset (sdata->header.dshb_mte.dti_first_page,
sdata->header.dshb_page_size,
offset = compute_offset (sdata->header.dshb_mte.dti_first_page,
sdata->header.dshb_page_size,
- entry_size, index);
+ entry_size,
sym_
index);
if (bfd_seek (abfd, offset, SEEK_SET) < 0)
return -1;
if (bfd_seek (abfd, offset, SEEK_SET) < 0)
return -1;
@@
-627,7
+635,7
@@
bfd_sym_fetch_modules_table_entry (bfd *abfd,
int
bfd_sym_fetch_file_references_table_entry (bfd *abfd,
bfd_sym_file_references_table_entry *entry,
int
bfd_sym_fetch_file_references_table_entry (bfd *abfd,
bfd_sym_file_references_table_entry *entry,
- unsigned long index)
+ unsigned long
sym_
index)
{
void (*parser) (unsigned char *, size_t, bfd_sym_file_references_table_entry *);
unsigned long offset;
{
void (*parser) (unsigned char *, size_t, bfd_sym_file_references_table_entry *);
unsigned long offset;
@@
-639,7
+647,7
@@
bfd_sym_fetch_file_references_table_entry (bfd *abfd,
BFD_ASSERT (bfd_sym_valid (abfd));
sdata = abfd->tdata.sym_data;
BFD_ASSERT (bfd_sym_valid (abfd));
sdata = abfd->tdata.sym_data;
- if (index == 0)
+ if (
sym_
index == 0)
return -1;
switch (sdata->version)
return -1;
switch (sdata->version)
@@
-662,7
+670,7
@@
bfd_sym_fetch_file_references_table_entry (bfd *abfd,
offset = compute_offset (sdata->header.dshb_frte.dti_first_page,
sdata->header.dshb_page_size,
offset = compute_offset (sdata->header.dshb_frte.dti_first_page,
sdata->header.dshb_page_size,
- entry_size, index);
+ entry_size,
sym_
index);
if (bfd_seek (abfd, offset, SEEK_SET) < 0)
return -1;
if (bfd_seek (abfd, offset, SEEK_SET) < 0)
return -1;
@@
-677,7
+685,7
@@
bfd_sym_fetch_file_references_table_entry (bfd *abfd,
int
bfd_sym_fetch_contained_modules_table_entry (bfd *abfd,
bfd_sym_contained_modules_table_entry *entry,
int
bfd_sym_fetch_contained_modules_table_entry (bfd *abfd,
bfd_sym_contained_modules_table_entry *entry,
- unsigned long index)
+ unsigned long
sym_
index)
{
void (*parser) (unsigned char *, size_t, bfd_sym_contained_modules_table_entry *);
unsigned long offset;
{
void (*parser) (unsigned char *, size_t, bfd_sym_contained_modules_table_entry *);
unsigned long offset;
@@
-689,7
+697,7
@@
bfd_sym_fetch_contained_modules_table_entry (bfd *abfd,
BFD_ASSERT (bfd_sym_valid (abfd));
sdata = abfd->tdata.sym_data;
BFD_ASSERT (bfd_sym_valid (abfd));
sdata = abfd->tdata.sym_data;
- if (index == 0)
+ if (
sym_
index == 0)
return -1;
switch (sdata->version)
return -1;
switch (sdata->version)
@@
-712,7
+720,7
@@
bfd_sym_fetch_contained_modules_table_entry (bfd *abfd,
offset = compute_offset (sdata->header.dshb_cmte.dti_first_page,
sdata->header.dshb_page_size,
offset = compute_offset (sdata->header.dshb_cmte.dti_first_page,
sdata->header.dshb_page_size,
- entry_size, index);
+ entry_size,
sym_
index);
if (bfd_seek (abfd, offset, SEEK_SET) < 0)
return -1;
if (bfd_seek (abfd, offset, SEEK_SET) < 0)
return -1;
@@
-727,7
+735,7
@@
bfd_sym_fetch_contained_modules_table_entry (bfd *abfd,
int
bfd_sym_fetch_contained_variables_table_entry (bfd *abfd,
bfd_sym_contained_variables_table_entry *entry,
int
bfd_sym_fetch_contained_variables_table_entry (bfd *abfd,
bfd_sym_contained_variables_table_entry *entry,
- unsigned long index)
+ unsigned long
sym_
index)
{
void (*parser) (unsigned char *, size_t, bfd_sym_contained_variables_table_entry *);
unsigned long offset;
{
void (*parser) (unsigned char *, size_t, bfd_sym_contained_variables_table_entry *);
unsigned long offset;
@@
-739,7
+747,7
@@
bfd_sym_fetch_contained_variables_table_entry (bfd *abfd,
BFD_ASSERT (bfd_sym_valid (abfd));
sdata = abfd->tdata.sym_data;
BFD_ASSERT (bfd_sym_valid (abfd));
sdata = abfd->tdata.sym_data;
- if (index == 0)
+ if (
sym_
index == 0)
return -1;
switch (sdata->version)
return -1;
switch (sdata->version)
@@
-762,7
+770,7
@@
bfd_sym_fetch_contained_variables_table_entry (bfd *abfd,
offset = compute_offset (sdata->header.dshb_cvte.dti_first_page,
sdata->header.dshb_page_size,
offset = compute_offset (sdata->header.dshb_cvte.dti_first_page,
sdata->header.dshb_page_size,
- entry_size, index);
+ entry_size,
sym_
index);
if (bfd_seek (abfd, offset, SEEK_SET) < 0)
return -1;
if (bfd_seek (abfd, offset, SEEK_SET) < 0)
return -1;
@@
-777,7
+785,7
@@
bfd_sym_fetch_contained_variables_table_entry (bfd *abfd,
int
bfd_sym_fetch_contained_statements_table_entry (bfd *abfd,
bfd_sym_contained_statements_table_entry *entry,
int
bfd_sym_fetch_contained_statements_table_entry (bfd *abfd,
bfd_sym_contained_statements_table_entry *entry,
- unsigned long index)
+ unsigned long
sym_
index)
{
void (*parser) (unsigned char *, size_t, bfd_sym_contained_statements_table_entry *);
unsigned long offset;
{
void (*parser) (unsigned char *, size_t, bfd_sym_contained_statements_table_entry *);
unsigned long offset;
@@
-789,7
+797,7
@@
bfd_sym_fetch_contained_statements_table_entry (bfd *abfd,
BFD_ASSERT (bfd_sym_valid (abfd));
sdata = abfd->tdata.sym_data;
BFD_ASSERT (bfd_sym_valid (abfd));
sdata = abfd->tdata.sym_data;
- if (index == 0)
+ if (
sym_
index == 0)
return -1;
switch (sdata->version)
return -1;
switch (sdata->version)
@@
-812,7
+820,7
@@
bfd_sym_fetch_contained_statements_table_entry (bfd *abfd,
offset = compute_offset (sdata->header.dshb_csnte.dti_first_page,
sdata->header.dshb_page_size,
offset = compute_offset (sdata->header.dshb_csnte.dti_first_page,
sdata->header.dshb_page_size,
- entry_size, index);
+ entry_size,
sym_
index);
if (bfd_seek (abfd, offset, SEEK_SET) < 0)
return -1;
if (bfd_seek (abfd, offset, SEEK_SET) < 0)
return -1;
@@
-827,7
+835,7
@@
bfd_sym_fetch_contained_statements_table_entry (bfd *abfd,
int
bfd_sym_fetch_contained_labels_table_entry (bfd *abfd,
bfd_sym_contained_labels_table_entry *entry,
int
bfd_sym_fetch_contained_labels_table_entry (bfd *abfd,
bfd_sym_contained_labels_table_entry *entry,
- unsigned long index)
+ unsigned long
sym_
index)
{
void (*parser) (unsigned char *, size_t, bfd_sym_contained_labels_table_entry *);
unsigned long offset;
{
void (*parser) (unsigned char *, size_t, bfd_sym_contained_labels_table_entry *);
unsigned long offset;
@@
-839,7
+847,7
@@
bfd_sym_fetch_contained_labels_table_entry (bfd *abfd,
BFD_ASSERT (bfd_sym_valid (abfd));
sdata = abfd->tdata.sym_data;
BFD_ASSERT (bfd_sym_valid (abfd));
sdata = abfd->tdata.sym_data;
- if (index == 0)
+ if (
sym_
index == 0)
return -1;
switch (sdata->version)
return -1;
switch (sdata->version)
@@
-862,7
+870,7
@@
bfd_sym_fetch_contained_labels_table_entry (bfd *abfd,
offset = compute_offset (sdata->header.dshb_clte.dti_first_page,
sdata->header.dshb_page_size,
offset = compute_offset (sdata->header.dshb_clte.dti_first_page,
sdata->header.dshb_page_size,
- entry_size, index);
+ entry_size,
sym_
index);
if (bfd_seek (abfd, offset, SEEK_SET) < 0)
return -1;
if (bfd_seek (abfd, offset, SEEK_SET) < 0)
return -1;
@@
-877,7
+885,7
@@
bfd_sym_fetch_contained_labels_table_entry (bfd *abfd,
int
bfd_sym_fetch_contained_types_table_entry (bfd *abfd,
bfd_sym_contained_types_table_entry *entry,
int
bfd_sym_fetch_contained_types_table_entry (bfd *abfd,
bfd_sym_contained_types_table_entry *entry,
- unsigned long index)
+ unsigned long
sym_
index)
{
void (*parser) (unsigned char *, size_t, bfd_sym_contained_types_table_entry *);
unsigned long offset;
{
void (*parser) (unsigned char *, size_t, bfd_sym_contained_types_table_entry *);
unsigned long offset;
@@
-889,7
+897,7
@@
bfd_sym_fetch_contained_types_table_entry (bfd *abfd,
BFD_ASSERT (bfd_sym_valid (abfd));
sdata = abfd->tdata.sym_data;
BFD_ASSERT (bfd_sym_valid (abfd));
sdata = abfd->tdata.sym_data;
- if (index == 0)
+ if (
sym_
index == 0)
return -1;
switch (sdata->version)
return -1;
switch (sdata->version)
@@
-912,7
+920,7
@@
bfd_sym_fetch_contained_types_table_entry (bfd *abfd,
offset = compute_offset (sdata->header.dshb_ctte.dti_first_page,
sdata->header.dshb_page_size,
offset = compute_offset (sdata->header.dshb_ctte.dti_first_page,
sdata->header.dshb_page_size,
- entry_size, index);
+ entry_size,
sym_
index);
if (bfd_seek (abfd, offset, SEEK_SET) < 0)
return -1;
if (bfd_seek (abfd, offset, SEEK_SET) < 0)
return -1;
@@
-927,7
+935,7
@@
bfd_sym_fetch_contained_types_table_entry (bfd *abfd,
int
bfd_sym_fetch_file_references_index_table_entry (bfd *abfd,
bfd_sym_file_references_index_table_entry *entry,
int
bfd_sym_fetch_file_references_index_table_entry (bfd *abfd,
bfd_sym_file_references_index_table_entry *entry,
- unsigned long index)
+ unsigned long
sym_
index)
{
void (*parser) (unsigned char *, size_t, bfd_sym_file_references_index_table_entry *);
unsigned long offset;
{
void (*parser) (unsigned char *, size_t, bfd_sym_file_references_index_table_entry *);
unsigned long offset;
@@
-939,7
+947,7
@@
bfd_sym_fetch_file_references_index_table_entry (bfd *abfd,
BFD_ASSERT (bfd_sym_valid (abfd));
sdata = abfd->tdata.sym_data;
BFD_ASSERT (bfd_sym_valid (abfd));
sdata = abfd->tdata.sym_data;
- if (index == 0)
+ if (
sym_
index == 0)
return -1;
switch (sdata->version)
return -1;
switch (sdata->version)
@@
-962,7
+970,7
@@
bfd_sym_fetch_file_references_index_table_entry (bfd *abfd,
offset = compute_offset (sdata->header.dshb_fite.dti_first_page,
sdata->header.dshb_page_size,
offset = compute_offset (sdata->header.dshb_fite.dti_first_page,
sdata->header.dshb_page_size,
- entry_size, index);
+ entry_size,
sym_
index);
if (bfd_seek (abfd, offset, SEEK_SET) < 0)
return -1;
if (bfd_seek (abfd, offset, SEEK_SET) < 0)
return -1;
@@
-977,7
+985,7
@@
bfd_sym_fetch_file_references_index_table_entry (bfd *abfd,
int
bfd_sym_fetch_constant_pool_entry (bfd *abfd,
bfd_sym_constant_pool_entry *entry,
int
bfd_sym_fetch_constant_pool_entry (bfd *abfd,
bfd_sym_constant_pool_entry *entry,
- unsigned long index)
+ unsigned long
sym_
index)
{
void (*parser) (unsigned char *, size_t, bfd_sym_constant_pool_entry *);
unsigned long offset;
{
void (*parser) (unsigned char *, size_t, bfd_sym_constant_pool_entry *);
unsigned long offset;
@@
-989,7
+997,7
@@
bfd_sym_fetch_constant_pool_entry (bfd *abfd,
BFD_ASSERT (bfd_sym_valid (abfd));
sdata = abfd->tdata.sym_data;
BFD_ASSERT (bfd_sym_valid (abfd));
sdata = abfd->tdata.sym_data;
- if (index == 0)
+ if (
sym_
index == 0)
return -1;
switch (sdata->version)
return -1;
switch (sdata->version)
@@
-1012,7
+1020,7
@@
bfd_sym_fetch_constant_pool_entry (bfd *abfd,
offset = compute_offset (sdata->header.dshb_fite.dti_first_page,
sdata->header.dshb_page_size,
offset = compute_offset (sdata->header.dshb_fite.dti_first_page,
sdata->header.dshb_page_size,
- entry_size, index);
+ entry_size,
sym_
index);
if (bfd_seek (abfd, offset, SEEK_SET) < 0)
return -1;
if (bfd_seek (abfd, offset, SEEK_SET) < 0)
return -1;
@@
-1027,7
+1035,7
@@
bfd_sym_fetch_constant_pool_entry (bfd *abfd,
int
bfd_sym_fetch_type_table_entry (bfd *abfd,
bfd_sym_type_table_entry *entry,
int
bfd_sym_fetch_type_table_entry (bfd *abfd,
bfd_sym_type_table_entry *entry,
- unsigned long index)
+ unsigned long
sym_
index)
{
void (*parser) (unsigned char *, size_t, bfd_sym_type_table_entry *);
unsigned long offset;
{
void (*parser) (unsigned char *, size_t, bfd_sym_type_table_entry *);
unsigned long offset;
@@
-1059,7
+1067,7
@@
bfd_sym_fetch_type_table_entry (bfd *abfd,
offset = compute_offset (sdata->header.dshb_tte.dti_first_page,
sdata->header.dshb_page_size,
offset = compute_offset (sdata->header.dshb_tte.dti_first_page,
sdata->header.dshb_page_size,
- entry_size, index);
+ entry_size,
sym_
index);
if (bfd_seek (abfd, offset, SEEK_SET) < 0)
return -1;
if (bfd_seek (abfd, offset, SEEK_SET) < 0)
return -1;
@@
-1077,10
+1085,8
@@
bfd_sym_fetch_type_information_table_entry (bfd *abfd,
unsigned long offset)
{
unsigned char buf[4];
unsigned long offset)
{
unsigned char buf[4];
- bfd_sym_data_struct *sdata = NULL;
BFD_ASSERT (bfd_sym_valid (abfd));
BFD_ASSERT (bfd_sym_valid (abfd));
- sdata = abfd->tdata.sym_data;
if (offset == 0)
return -1;
if (offset == 0)
return -1;
@@
-1119,7
+1125,7
@@
bfd_sym_fetch_type_information_table_entry (bfd *abfd,
int
bfd_sym_fetch_type_table_information (bfd *abfd,
bfd_sym_type_information_table_entry *entry,
int
bfd_sym_fetch_type_table_information (bfd *abfd,
bfd_sym_type_information_table_entry *entry,
- unsigned long index)
+ unsigned long
sym_
index)
{
bfd_sym_type_table_entry tindex;
bfd_sym_data_struct *sdata = NULL;
{
bfd_sym_type_table_entry tindex;
bfd_sym_data_struct *sdata = NULL;
@@
-1129,10
+1135,10
@@
bfd_sym_fetch_type_table_information (bfd *abfd,
if (sdata->header.dshb_tte.dti_object_count <= 99)
return -1;
if (sdata->header.dshb_tte.dti_object_count <= 99)
return -1;
- if (index < 100)
+ if (
sym_
index < 100)
return -1;
return -1;
- if (bfd_sym_fetch_type_table_entry (abfd, &tindex, index - 100) < 0)
+ if (bfd_sym_fetch_type_table_entry (abfd, &tindex,
sym_
index - 100) < 0)
return -1;
if (bfd_sym_fetch_type_information_table_entry (abfd, entry, tindex) < 0)
return -1;
return -1;
if (bfd_sym_fetch_type_information_table_entry (abfd, entry, tindex) < 0)
return -1;
@@
-1141,30
+1147,30
@@
bfd_sym_fetch_type_table_information (bfd *abfd,
}
const unsigned char *
}
const unsigned char *
-bfd_sym_symbol_name (bfd *abfd, unsigned long index)
+bfd_sym_symbol_name (bfd *abfd, unsigned long
sym_
index)
{
bfd_sym_data_struct *sdata = NULL;
BFD_ASSERT (bfd_sym_valid (abfd));
sdata = abfd->tdata.sym_data;
{
bfd_sym_data_struct *sdata = NULL;
BFD_ASSERT (bfd_sym_valid (abfd));
sdata = abfd->tdata.sym_data;
- if (index == 0)
+ if (
sym_
index == 0)
return (const unsigned char *) "";
return (const unsigned char *) "";
- index *= 2;
- if ((index / sdata->header.dshb_page_size)
+
sym_
index *= 2;
+ if ((
sym_
index / sdata->header.dshb_page_size)
> sdata->header.dshb_nte.dti_page_count)
return (const unsigned char *) "\09[INVALID]";
> sdata->header.dshb_nte.dti_page_count)
return (const unsigned char *) "\09[INVALID]";
- return (const unsigned char *) sdata->name_table + index;
+ return (const unsigned char *) sdata->name_table +
sym_
index;
}
const unsigned char *
}
const unsigned char *
-bfd_sym_module_name (bfd *abfd, unsigned long index)
+bfd_sym_module_name (bfd *abfd, unsigned long
sym_
index)
{
bfd_sym_modules_table_entry entry;
{
bfd_sym_modules_table_entry entry;
- if (bfd_sym_fetch_modules_table_entry (abfd, &entry, index) < 0)
+ if (bfd_sym_fetch_modules_table_entry (abfd, &entry,
sym_
index) < 0)
return (const unsigned char *) "\09[INVALID]";
return bfd_sym_symbol_name (abfd, entry.mte_nte_index);
return (const unsigned char *) "\09[INVALID]";
return bfd_sym_symbol_name (abfd, entry.mte_nte_index);
@@
-1639,7
+1645,7
@@
bfd_sym_print_type_information (bfd *abfd,
bfd_sym_symbol_name (abfd, tinfo.nte_index)[0],
&bfd_sym_symbol_name (abfd, tinfo.nte_index)[1]);
}
bfd_sym_symbol_name (abfd, tinfo.nte_index)[0],
&bfd_sym_symbol_name (abfd, tinfo.nte_index)[1]);
}
- fprintf (f, " (TTE %lu)", value);
+ fprintf (f, " (TTE %lu)",
(unsigned long)
value);
break;
}
break;
}
@@
-1700,13
+1706,13
@@
bfd_sym_print_type_information (bfd *abfd,
fprintf (f, "union (0x%x) of ", type);
bfd_sym_fetch_long (buf, len, offset, &offset, &nrec);
fprintf (f, "union (0x%x) of ", type);
bfd_sym_fetch_long (buf, len, offset, &offset, &nrec);
- fprintf (f, "%lu elements: ", nrec);
+ fprintf (f, "%lu elements: ",
(unsigned long)
nrec);
for (i = 0; i < nrec; i++)
{
bfd_sym_fetch_long (buf, len, offset, &offset, &eloff);
fprintf (f, "\n ");
for (i = 0; i < nrec; i++)
{
bfd_sym_fetch_long (buf, len, offset, &offset, &eloff);
fprintf (f, "\n ");
- fprintf (f, "offset %lu: ", eloff);
+ fprintf (f, "offset %lu: ",
(unsigned long)
eloff);
bfd_sym_print_type_information (abfd, f, buf, len, offset, &offset);
}
break;
bfd_sym_print_type_information (abfd, f, buf, len, offset, &offset);
}
break;
@@
-1734,7
+1740,7
@@
bfd_sym_print_type_information (bfd *abfd,
bfd_sym_symbol_name (abfd, value)[0],
&bfd_sym_symbol_name (abfd, value)[1]);
bfd_sym_symbol_name (abfd, value)[0],
&bfd_sym_symbol_name (abfd, value)[1]);
- fprintf (f, " (NTE %lu) with type ", value);
+ fprintf (f, " (NTE %lu) with type ",
(unsigned long)
value);
bfd_sym_print_type_information (abfd, f, buf, len, offset, &offset);
break;
}
bfd_sym_print_type_information (abfd, f, buf, len, offset, &offset);
break;
}
@@
-1854,24
+1860,24
@@
bfd_sym_display_name_table_entry (bfd *abfd,
FILE *f,
unsigned char *entry)
{
FILE *f,
unsigned char *entry)
{
- unsigned long index;
+ unsigned long
sym_
index;
unsigned long offset;
bfd_sym_data_struct *sdata = NULL;
BFD_ASSERT (bfd_sym_valid (abfd));
sdata = abfd->tdata.sym_data;
unsigned long offset;
bfd_sym_data_struct *sdata = NULL;
BFD_ASSERT (bfd_sym_valid (abfd));
sdata = abfd->tdata.sym_data;
- index = (entry - sdata->name_table) / 2;
+
sym_
index = (entry - sdata->name_table) / 2;
if (sdata->version >= BFD_SYM_VERSION_3_4 && entry[0] == 255 && entry[1] == 0)
{
unsigned short length = bfd_getb16 (entry + 2);
if (sdata->version >= BFD_SYM_VERSION_3_4 && entry[0] == 255 && entry[1] == 0)
{
unsigned short length = bfd_getb16 (entry + 2);
- fprintf (f, "[%8lu] \"%.*s\"\n", index, length, entry + 4);
+ fprintf (f, "[%8lu] \"%.*s\"\n",
sym_
index, length, entry + 4);
offset = 2 + length + 1;
}
else
{
if (! (entry[0] == 0 || (entry[0] == 1 && entry[1] == '\0')))
offset = 2 + length + 1;
}
else
{
if (! (entry[0] == 0 || (entry[0] == 1 && entry[1] == '\0')))
- fprintf (f, "[%8lu] \"%.*s\"\n", index, entry[0], entry + 1);
+ fprintf (f, "[%8lu] \"%.*s\"\n",
sym_
index, entry[0], entry + 1);
if (sdata->version >= BFD_SYM_VERSION_3_4)
offset = entry[0] + 2;
if (sdata->version >= BFD_SYM_VERSION_3_4)
offset = entry[0] + 2;
@@
-2173,7
+2179,7
@@
void
bfd_sym_display_type_information_table (bfd *abfd, FILE *f)
{
unsigned long i;
bfd_sym_display_type_information_table (bfd *abfd, FILE *f)
{
unsigned long i;
- bfd_sym_type_table_entry index;
+ bfd_sym_type_table_entry
sym_
index;
bfd_sym_type_information_table_entry entry;
bfd_sym_data_struct *sdata = NULL;
bfd_sym_type_information_table_entry entry;
bfd_sym_data_struct *sdata = NULL;
@@
-2191,13
+2197,13
@@
bfd_sym_display_type_information_table (bfd *abfd, FILE *f)
for (i = 100; i <= sdata->header.dshb_tte.dti_object_count; i++)
{
for (i = 100; i <= sdata->header.dshb_tte.dti_object_count; i++)
{
- if (bfd_sym_fetch_type_table_entry (abfd, &index, i - 100) < 0)
+ if (bfd_sym_fetch_type_table_entry (abfd, &
sym_
index, i - 100) < 0)
fprintf (f, " [%8lu] [INVALID]\n", i);
else
{
fprintf (f, " [%8lu] [INVALID]\n", i);
else
{
- fprintf (f, " [%8lu] (TINFO %lu) ", i, index);
+ fprintf (f, " [%8lu] (TINFO %lu) ", i,
sym_
index);
- if (bfd_sym_fetch_type_information_table_entry (abfd, &entry, index) < 0)
+ if (bfd_sym_fetch_type_information_table_entry (abfd, &entry,
sym_
index) < 0)
fprintf (f, "[INVALID]");
else
bfd_sym_print_type_information_table_entry (abfd, f, &entry);
fprintf (f, "[INVALID]");
else
bfd_sym_print_type_information_table_entry (abfd, f, &entry);
@@
-2313,6
+2319,7
@@
const bfd_target sym_vec =
0, /* Symbol_leading_char. */
' ', /* AR_pad_char. */
16, /* AR_max_namelen. */
0, /* Symbol_leading_char. */
' ', /* AR_pad_char. */
16, /* AR_max_namelen. */
+ 0, /* match priority. */
bfd_getb64, bfd_getb_signed_64, bfd_putb64,
bfd_getb32, bfd_getb_signed_32, bfd_putb32,
bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* Data. */
bfd_getb64, bfd_getb_signed_64, bfd_putb64,
bfd_getb32, bfd_getb_signed_32, bfd_putb32,
bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* Data. */
This page took
0.031783 seconds
and
4
git commands to generate.