+2000-02-21 Alan Modra <alan@spri.levels.unisa.edu.au>
+
+ * archures.c (bfd_octets_per_byte): Return unsigned int.
+ (bfd_arch_mach_octets_per_byte): Ditto.
+ * libbfd.c (bfd_read, bfd_seek): Quell signed vs. unsigned
+ comparison warning.
+ * section.c (bfd_get_section_size_before_reloc): Quell signed
+ vs. unsigned comparison warning.
+ (bfd_get_section_size_after_reloc): Same here. Fix parentheses too.
+ * trad-core.c (trad_unix_core_file_p): Correct 2000-01-27
+ change. What was I thinking?
+ * bfd-in2.h: Regenerate.
+
+ * elflink.h (elf_gc_sweep): Skip non-elf input bfds.
+ (elf_gc_sections): Same here.
+ (elf_gc_common_finalize_got_offsets): And here.
+
2000-02-21 Ian Lance Taylor <ian@zembu.com>
ELF HPPA doesn't work at present; remove it until it does.
bfd_octets_per_byte
SYNOPSIS
- int bfd_octets_per_byte(bfd *abfd);
+ unsigned int bfd_octets_per_byte(bfd *abfd);
DESCRIPTION
Return the number of octets (8-bit quantities) per target byte
*/
-int
+unsigned int
bfd_octets_per_byte (abfd)
bfd * abfd;
{
bfd_arch_mach_octets_per_byte
SYNOPSIS
- int bfd_arch_mach_octets_per_byte(enum bfd_architecture arch,
- unsigned long machine);
+ unsigned int bfd_arch_mach_octets_per_byte(enum bfd_architecture arch,
+ unsigned long machine);
DESCRIPTION
See bfd_octets_per_byte.
available
*/
-int
+unsigned int
bfd_arch_mach_octets_per_byte (arch, mach)
enum bfd_architecture arch;
unsigned long mach;
return ap->bits_per_byte / 8;
return 1;
}
-
extern const struct symbol_cache_entry * const bfd_und_symbol;
extern const struct symbol_cache_entry * const bfd_ind_symbol;
#define bfd_get_section_size_before_reloc(section) \
- (section->reloc_done ? (abort(),1): (section)->_raw_size)
+ ((section)->reloc_done ? (abort (), (bfd_size_type) 1) \
+ : (section)->_raw_size)
#define bfd_get_section_size_after_reloc(section) \
- ((section->reloc_done) ? (section)->_cooked_size: (abort(),1))
+ ((section)->reloc_done ? (section)->_cooked_size \
+ : (abort (), (bfd_size_type) 1))
asection *
bfd_get_section_by_name PARAMS ((bfd *abfd, CONST char *name));
bfd_printable_arch_mach
PARAMS ((enum bfd_architecture arch, unsigned long machine));
-int
+unsigned int
bfd_octets_per_byte PARAMS ((bfd *abfd));
-int
+unsigned int
bfd_arch_mach_octets_per_byte PARAMS ((enum bfd_architecture arch,
unsigned long machine));
{
asection *o;
+ if (bfd_get_flavour (sub) != bfd_target_elf_flavour)
+ continue;
+
for (o = sub->sections; o != NULL; o = o->next)
{
/* Keep special sections. Keep .debug sections. */
for (sub = info->input_bfds; sub != NULL; sub = sub->link_next)
{
asection *o;
+
+ if (bfd_get_flavour (sub) != bfd_target_elf_flavour)
+ continue;
+
for (o = sub->sections; o != NULL; o = o->next)
{
if (o->flags & SEC_KEEP)
/* Do the local .got entries first. */
for (i = info->input_bfds; i; i = i->link_next)
{
- bfd_signed_vma *local_got = elf_local_got_refcounts (i);
+ bfd_signed_vma *local_got;
bfd_size_type j, locsymcount;
Elf_Internal_Shdr *symtab_hdr;
+ if (bfd_get_flavour (i) != bfd_target_elf_flavour)
+ continue;
+
+ local_got = elf_local_got_refcounts (i);
if (!local_got)
continue;
get = size * nitems;
if (abfd->where + get > bim->size)
{
- if (bim->size < abfd->where)
+ if (bim->size < (bfd_size_type) abfd->where)
get = 0;
else
get = bim->size - abfd->where;
else
abfd->where += position;
- if (abfd->where > bim->size)
+ if ((bfd_size_type) abfd->where > bim->size)
{
abfd->where = bim->size;
bfd_set_error (bfd_error_file_truncated);
.extern const struct symbol_cache_entry * const bfd_und_symbol;
.extern const struct symbol_cache_entry * const bfd_ind_symbol;
.#define bfd_get_section_size_before_reloc(section) \
-. (section->reloc_done ? (abort(),1): (section)->_raw_size)
+. ((section)->reloc_done ? (abort (), (bfd_size_type) 1) \
+. : (section)->_raw_size)
.#define bfd_get_section_size_after_reloc(section) \
-. ((section->reloc_done) ? (section)->_cooked_size: (abort(),1))
+. ((section)->reloc_done ? (section)->_cooked_size \
+. : (abort (), (bfd_size_type) 1))
*/
/* We use a macro to initialize the static asymbol structures because
0 is at the place pointed to by u_ar0 (by setting the vma of the start
of the section to -u_ar0). GDB uses this info to locate the regs,
using minor trickery to get around the offset-or-absolute-addr problem. */
- core_regsec (abfd)->vma = (asection *) (0 - (bfd_vma) u.u_ar0);
+ core_regsec (abfd)->vma = - (bfd_vma) u.u_ar0;
core_datasec (abfd)->filepos = NBPG * UPAGES;
core_stacksec (abfd)->filepos = (NBPG * UPAGES) + NBPG * u.u_dsize
+2000-02-21 Alan Modra <alan@spri.levels.unisa.edu.au>
+
+ * dis-asm.h (struct disassemble_info): Change `length' param of
+ read_memory_func to unsigned. Change type of `buffer_length' and
+ `octets_per_byte' to unsigned.
+ (buffer_read_memory): Change `length' param to unsigned.
+
2000-02-16 Nick Clifton <nickc@cygnus.com>
* dis-asm.h: Add prototypes for ARM register name functions.
INFO is a pointer to this struct.
Returns an errno value or 0 for success. */
int (*read_memory_func)
- PARAMS ((bfd_vma memaddr, bfd_byte *myaddr, int length,
+ PARAMS ((bfd_vma memaddr, bfd_byte *myaddr, unsigned int length,
struct disassemble_info *info));
/* Function which should be called if we get an error that we can't
/* These are for buffer_read_memory. */
bfd_byte *buffer;
bfd_vma buffer_vma;
- int buffer_length;
+ unsigned int buffer_length;
/* This variable may be set by the instruction decoder. It suggests
the number of bytes objdump should display on a single line. If
/* Number of octets per incremented target address
Normally one, but some DSPs have byte sizes of 16 or 32 bits
*/
- int octets_per_byte;
+ unsigned int octets_per_byte;
/* Results from instruction decoders. Not all decoders yet support
this information. This info is set each time an instruction is
/* Here is a function which callers may wish to use for read_memory_func.
It gets bytes from a buffer. */
extern int buffer_read_memory
- PARAMS ((bfd_vma, bfd_byte *, int, struct disassemble_info *));
+ PARAMS ((bfd_vma, bfd_byte *, unsigned int, struct disassemble_info *));
/* This function goes with buffer_read_memory.
It prints a message using info->fprintf_func and info->stream. */
+2000-02-21 Alan Modra <alan@spri.levels.unisa.edu.au>
+
+ * dis-buf.c (buffer_read_memory): Change `length' param and all int
+ vars to unsigned.
+
Thu Feb 17 00:18:12 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
* sh-dis.c (print_movxy, print_insn_ddt, print_dsp_reg): New functions.
buffer_read_memory (memaddr, myaddr, length, info)
bfd_vma memaddr;
bfd_byte *myaddr;
- int length;
+ unsigned int length;
struct disassemble_info *info;
{
- int opb = info->octets_per_byte;
- int end_addr_offset = length / opb;
- int max_addr_offset = info->buffer_length / opb;
- int octets = (memaddr - info->buffer_vma) * opb;
+ unsigned int opb = info->octets_per_byte;
+ unsigned int end_addr_offset = length / opb;
+ unsigned int max_addr_offset = info->buffer_length / opb;
+ unsigned int octets = (memaddr - info->buffer_vma) * opb;
if (memaddr < info->buffer_vma
|| memaddr - info->buffer_vma + end_addr_offset > max_addr_offset)