aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2000-02-21 12:01:27 +0000
committerAlan Modra <amodra@gmail.com>2000-02-21 12:01:27 +0000
commitf6af82bd4470673eef9562d4ed3a2717c1d749ab (patch)
tree049fedd33d8bf74259017f441ef55ee8920b9cc2 /ld
parent2403ff6fdb9d23ee79863d2b2aacac46a2d8283d (diff)
downloadgdb-f6af82bd4470673eef9562d4ed3a2717c1d749ab.zip
gdb-f6af82bd4470673eef9562d4ed3a2717c1d749ab.tar.gz
gdb-f6af82bd4470673eef9562d4ed3a2717c1d749ab.tar.bz2
This lot mainly cleans up `comparison between signed and unsigned' gcc
warnings. One usused var, and a macro parenthesis fix too. Also check input sections are elf when doing gc in elflink.h.
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog9
-rw-r--r--ld/ldlang.c44
2 files changed, 31 insertions, 22 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index b42e949..7d6db0e 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,12 @@
+2000-02-21 Alan Modra <alan@spri.levels.unisa.edu.au>
+
+ * ldlang.c (print_input_section, print_data_statement,
+ print_reloc_statement, print_padding_statement, insert_pad,
+ size_input_section, lang_check_section_addresses,
+ lang_size_sections, lang_do_assignments, lang_set_startof,
+ lang_one_common): Change `opb' to unsigned.
+ (lang_do_assignments): Also change `size' to unsigned.
+
2000-02-16 Richard Henderson <rth@cygnus.com>
* scripttempl/elf.sc: Place OTHER_PLT_RELOC_SECTION.
diff --git a/ld/ldlang.c b/ld/ldlang.c
index a514ea0..d40ff07 100644
--- a/ld/ldlang.c
+++ b/ld/ldlang.c
@@ -2169,8 +2169,8 @@ print_input_section (in)
{
asection *i = in->section;
bfd_size_type size = i->_cooked_size != 0 ? i->_cooked_size : i->_raw_size;
- int opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture,
- ldfile_output_machine);
+ unsigned opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture,
+ ldfile_output_machine);
if (size != 0)
{
print_space ();
@@ -2236,8 +2236,8 @@ print_data_statement (data)
bfd_vma addr;
bfd_size_type size;
const char *name;
- int opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture,
- ldfile_output_machine);
+ unsigned opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture,
+ ldfile_output_machine);
for (i = 0; i < SECTION_NAME_MAP_LENGTH; i++)
print_space ();
@@ -2307,8 +2307,8 @@ print_reloc_statement (reloc)
int i;
bfd_vma addr;
bfd_size_type size;
- int opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture,
- ldfile_output_machine);
+ unsigned opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture,
+ ldfile_output_machine);
for (i = 0; i < SECTION_NAME_MAP_LENGTH; i++)
print_space ();
@@ -2339,8 +2339,8 @@ print_padding_statement (s)
{
int len;
bfd_vma addr;
- int opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture,
- ldfile_output_machine);
+ unsigned opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture,
+ ldfile_output_machine);
minfo (" *fill*");
@@ -2556,8 +2556,8 @@ insert_pad (this_ptr, fill, power, output_section_statement, dot)
inserting a magic 'padding' statement.
*/
- int opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture,
- ldfile_output_machine);
+ unsigned opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture,
+ ldfile_output_machine);
unsigned int alignment_needed = align_power (dot, power) - dot;
if (alignment_needed != 0)
@@ -2599,8 +2599,8 @@ size_input_section (this_ptr, output_section_statement, fill, dot, relax)
{
lang_input_section_type *is = &((*this_ptr)->input_section);
asection *i = is->section;
- int opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture,
- ldfile_output_machine);
+ unsigned opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture,
+ ldfile_output_machine);
if (is->ifile->just_syms_flag == false)
{
@@ -2643,7 +2643,7 @@ static void
lang_check_section_addresses ()
{
asection * s;
- int opb = bfd_octets_per_byte (output_bfd);
+ unsigned opb = bfd_octets_per_byte (output_bfd);
/* Scan all sections in the output list. */
for (s = output_bfd->sections; s != NULL; s = s->next)
@@ -2744,8 +2744,8 @@ lang_size_sections (s, output_section_statement, prev, fill, dot, relax)
bfd_vma dot;
boolean relax;
{
- int opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture,
- ldfile_output_machine);
+ unsigned opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture,
+ ldfile_output_machine);
/* Size up the sections from their constituent parts. */
for (; s != (lang_statement_union_type *) NULL; s = s->next)
@@ -3119,8 +3119,8 @@ lang_do_assignments (s, output_section_statement, fill, dot)
fill_type fill;
bfd_vma dot;
{
- int opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture,
- ldfile_output_machine);
+ unsigned opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture,
+ ldfile_output_machine);
for (; s != (lang_statement_union_type *) NULL; s = s->next)
{
@@ -3185,7 +3185,7 @@ lang_do_assignments (s, output_section_statement, fill, dot)
einfo (_("%F%P: invalid data statement\n"));
}
{
- int size;
+ unsigned int size;
switch (s->data_statement.type)
{
default:
@@ -3309,8 +3309,8 @@ lang_set_startof ()
h = bfd_link_hash_lookup (link_info.hash, buf, false, false, true);
if (h != NULL && h->type == bfd_link_hash_undefined)
{
- int opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture,
- ldfile_output_machine);
+ unsigned opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture,
+ ldfile_output_machine);
h->type = bfd_link_hash_defined;
if (s->_cooked_size != 0)
h->u.def.value = s->_cooked_size / opb;
@@ -3492,8 +3492,8 @@ lang_one_common (h, info)
unsigned int power_of_two;
bfd_vma size;
asection *section;
- int opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture,
- ldfile_output_machine);
+ unsigned opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture,
+ ldfile_output_machine);
if (h->type != bfd_link_hash_common)
return true;