= elfNN_aarch64_bfd_reloc_from_howto (howto);
unsigned long r_symndx;
bfd_byte *hit_data = contents + rel->r_offset;
- bfd_vma place, off, got_entry_addr;
+ bfd_vma place, off, got_entry_addr = 0;
bfd_signed_vma signed_addend;
struct elf_aarch64_link_hash_table *globals;
bfd_boolean weak_undef_p;
static void
eval_upper_either_sections (bfd *abfd, asection *s, void *data)
{
- char * base_sec_name;
+ const char * base_sec_name;
const char * curr_name;
char * either_name;
int curr_region;
if (bfd_link_relocatable (&link_info))
return;
- base_sec_name = (char *) data;
+ base_sec_name = (const char *) data;
curr_name = bfd_get_section_name (abfd, s);
/* Only concerned with .either input sections in the upper output section. */
static void
eval_lower_either_sections (bfd *abfd, asection *s, void *data)
{
- char * base_sec_name;
+ const char * base_sec_name;
const char * curr_name;
char * either_name;
int curr_region;
if (bfd_link_relocatable (&link_info))
return;
- base_sec_name = (char *) data;
+ base_sec_name = (const char *) data;
curr_name = bfd_get_section_name (abfd, s);
/* Only concerned with .either input sections in the lower or "default"
msp430_elf_after_allocation (void)
{
int relax_count = 0;
- int i;
+ unsigned int i;
/* Go over each section twice, once to place either sections that don't fit
in lower into upper, and then again to move any sections in upper that
fit in lower into lower. */
for (i = 0; i < 8; i++)
{
int placement_stage = (i < 4) ? LOWER_TO_UPPER : UPPER_TO_LOWER;
- char * base_sec_name;
+ const char * base_sec_name;
lang_output_section_statement_type * upper;
switch (i % 4)
{
+ default:
case 0:
- base_sec_name = concat (".text", NULL);
+ base_sec_name = ".text";
break;
case 1:
- base_sec_name = concat (".data", NULL);
+ base_sec_name = ".data";
break;
case 2:
- base_sec_name = concat (".bss", NULL);
+ base_sec_name = ".bss";
break;
case 3:
- base_sec_name = concat (".rodata", NULL);
+ base_sec_name = ".rodata";
break;
}
upper = lang_output_section_find (concat (".upper", base_sec_name, NULL));
abfd = abfd->link.next)
{
bfd_map_over_sections (abfd, eval_lower_either_sections,
- base_sec_name);
+ (void *) base_sec_name);
}
}
else if (placement_stage == UPPER_TO_LOWER)
abfd = abfd->link.next)
{
bfd_map_over_sections (abfd, eval_upper_either_sections,
- base_sec_name);
+ (void *) base_sec_name);
}
}
}
- free (base_sec_name);
}
gld${EMULATION_NAME}_after_allocation ();
}