mirror of
https://github.com/autc04/Retro68.git
synced 2025-01-23 08:31:06 +00:00
Revert "hacks to prevent ld crashes"
This reverts commit c58b44596a403b1f33f4a97a8ac951a5e31db9bc.
This commit is contained in:
parent
c58b44596a
commit
6513c4a117
@ -367,7 +367,7 @@ _bfd_xcoff_copy_private_bfd_data (bfd *ibfd, bfd *obfd)
|
||||
else
|
||||
{
|
||||
sec = coff_section_from_bfd_index (ibfd, ix->sntoc);
|
||||
if (sec == NULL || sec->output_section == NULL)
|
||||
if (sec == NULL)
|
||||
ox->sntoc = 0;
|
||||
else
|
||||
ox->sntoc = sec->output_section->target_index;
|
||||
@ -2564,12 +2564,8 @@ _bfd_xcoff_sizeof_headers (bfd *abfd,
|
||||
Don't try to renumber sections, just compute the upper bound. */
|
||||
max_index = 0;
|
||||
for (s = abfd->sections; s != NULL; s = s->next)
|
||||
{
|
||||
if (s->index > max_index)
|
||||
max_index = s->index;
|
||||
}
|
||||
if(max_index < 32) // ###RetroPPC: apparently, the above upper bound is incorrect.
|
||||
max_index = 32;
|
||||
|
||||
/* Allocate the per section counters. It could be possible to use a
|
||||
preallocated array as the number of sections is limited on XCOFF,
|
||||
|
@ -3619,8 +3619,6 @@ save_section_vma (const bfd *abfd, struct dwarf2_debug *stash)
|
||||
return FALSE;
|
||||
for (i = 0, s = abfd->sections; i < abfd->section_count; i++, s = s->next)
|
||||
{
|
||||
if(!s) // ###RetroPPC: apparently, section_count can be wrong?.
|
||||
break;
|
||||
if (s->output_section != NULL)
|
||||
stash->sec_vma[i] = s->output_section->vma + s->output_offset;
|
||||
else
|
||||
|
@ -3871,7 +3871,7 @@ bfd_xcoff_size_dynamic_sections (bfd *output_bfd,
|
||||
esym = (bfd_byte *) obj_coff_external_syms (sub);
|
||||
esymend = esym + symcount * symesz;
|
||||
|
||||
while (csectpp && esym < esymend)
|
||||
while (esym < esymend)
|
||||
{
|
||||
struct internal_syment sym;
|
||||
union internal_auxent aux;
|
||||
|
Loading…
x
Reference in New Issue
Block a user