more alpha fixes
rth@redhat.com
rth@redhat.com
Sun Jun 2 01:38:00 GMT 2002
In danger of passing gcc bootstrap on 7.2 any second now...
r~
bfd/
* elf64-alpha.c (elf64_alpha_relocate_section): Don't dereference
null when there are no got entries for a symbol.
(elf64_alpha_relax_find_tls_segment): Rearrange to avoid
uninitialized variable warning.
gas/
* config/tc-alpha.c (alpha_adjust_symtab_relocs): Fix thinko
with LITERALs without sequence numbers.
Index: bfd/elf64-alpha.c
===================================================================
RCS file: /cvs/src/src/bfd/elf64-alpha.c,v
retrieving revision 1.69
diff -c -p -d -r1.69 elf64-alpha.c
*** bfd/elf64-alpha.c 2 Jun 2002 06:23:30 -0000 1.69
--- bfd/elf64-alpha.c 2 Jun 2002 08:14:57 -0000
*************** elf64_alpha_relax_find_tls_segment (info
*** 1988,2011 ****
struct elf_link_tls_segment *seg;
{
bfd *output_bfd = info->sec->output_section->owner;
! asection *first_tls_sec = NULL, *o;
unsigned int align;
bfd_vma base, end;
for (o = output_bfd->sections; o ; o = o->next)
if ((o->flags & SEC_THREAD_LOCAL) != 0
&& (o->flags & SEC_LOAD) != 0)
! {
! first_tls_sec = o;
! break;
! }
! if (!first_tls_sec)
return NULL;
! base = first_tls_sec->vma;
align = 0;
! for (o = first_tls_sec; o && (o->flags & SEC_THREAD_LOCAL); o = o->next)
{
bfd_vma size;
--- 1988,2008 ----
struct elf_link_tls_segment *seg;
{
bfd *output_bfd = info->sec->output_section->owner;
! asection *o;
unsigned int align;
bfd_vma base, end;
for (o = output_bfd->sections; o ; o = o->next)
if ((o->flags & SEC_THREAD_LOCAL) != 0
&& (o->flags & SEC_LOAD) != 0)
! break;
! if (!o)
return NULL;
! base = o->vma;
align = 0;
! do
{
bfd_vma size;
*************** elf64_alpha_relax_find_tls_segment (info
*** 2021,2027 ****
--- 2018,2026 ----
size = lo->offset + lo->size;
}
end = o->vma + size;
+ o = o->next;
}
+ while (o && (o->flags & SEC_THREAD_LOCAL));
seg->start = base;
seg->size = end - base;
*************** elf64_alpha_relocate_section (output_bfd
*** 4366,4375 ****
/* Need to adjust local GOT entries' addends for SEC_MERGE
unless it has been done already. */
if ((sec->flags & SEC_MERGE)
! && ELF_ST_TYPE (sym->st_info) == STT_SECTION
! && (elf_section_data (sec)->sec_info_type
! == ELF_INFO_TYPE_MERGE)
! && !gotent->reloc_xlated)
{
struct alpha_elf_got_entry *ent;
asection *msec;
--- 4365,4375 ----
/* Need to adjust local GOT entries' addends for SEC_MERGE
unless it has been done already. */
if ((sec->flags & SEC_MERGE)
! && ELF_ST_TYPE (sym->st_info) == STT_SECTION
! && (elf_section_data (sec)->sec_info_type
! == ELF_INFO_TYPE_MERGE)
! && gotent
! && !gotent->reloc_xlated)
{
struct alpha_elf_got_entry *ent;
asection *msec;
Index: gas/config/tc-alpha.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-alpha.c,v
retrieving revision 1.43
diff -c -p -d -r1.43 tc-alpha.c
*** gas/config/tc-alpha.c 2 Jun 2002 02:28:45 -0000 1.43
--- gas/config/tc-alpha.c 2 Jun 2002 08:14:58 -0000
*************** alpha_adjust_symtab_relocs (abfd, sec, p
*** 1775,1782 ****
break;
case BFD_RELOC_ALPHA_ELF_LITERAL:
! if (fixp->tc_fix_data.info->saw_tlsgd
! || fixp->tc_fix_data.info->saw_tlsldm)
break;
/* FALLTHRU */
--- 1775,1783 ----
break;
case BFD_RELOC_ALPHA_ELF_LITERAL:
! if (fixp->tc_fix_data.info
! && (fixp->tc_fix_data.info->saw_tlsgd
! || fixp->tc_fix_data.info->saw_tlsldm))
break;
/* FALLTHRU */
*************** alpha_adjust_symtab_relocs (abfd, sec, p
*** 1832,1838 ****
/* FALLTHRU */
case BFD_RELOC_ALPHA_ELF_LITERAL:
! if (fixp->tc_fix_data.info->n_master == 1
&& ! fixp->tc_fix_data.info->multi_section_p)
{
for (slave = fixp->tc_fix_data.info->slaves;
--- 1833,1840 ----
/* FALLTHRU */
case BFD_RELOC_ALPHA_ELF_LITERAL:
! if (fixp->tc_fix_data.info
! && fixp->tc_fix_data.info->n_master == 1
&& ! fixp->tc_fix_data.info->multi_section_p)
{
for (slave = fixp->tc_fix_data.info->slaves;
More information about the Binutils
mailing list