mirror of
https://github.com/pspdev/pspsdk.git
synced 2025-10-04 09:08:30 +00:00
@@ -596,17 +596,11 @@ int calculate_outsize(void)
|
|||||||
mem_size = top_addr;
|
mem_size = top_addr;
|
||||||
}
|
}
|
||||||
|
|
||||||
out_sects++;
|
|
||||||
str_size += strlen(g_elfsections[i].szName) + 1;
|
str_size += strlen(g_elfsections[i].szName) + 1;
|
||||||
}
|
}
|
||||||
else if((g_elfsections[i].iType == SHT_REL) || (g_elfsections[i].iType == SHT_PRXRELOC))
|
else if((g_elfsections[i].iType == SHT_REL) || (g_elfsections[i].iType == SHT_PRXRELOC))
|
||||||
{
|
{
|
||||||
/* Check this is a reloc for an allocated section */
|
reloc_size += g_elfsections[i].iSize;
|
||||||
if(g_elfsections[g_elfsections[i].iInfo].iFlags & SHF_ALLOC)
|
|
||||||
{
|
|
||||||
reloc_size += g_elfsections[i].iSize;
|
|
||||||
out_sects++;
|
|
||||||
}
|
|
||||||
str_size += strlen(g_elfsections[i].szName) + 1;
|
str_size += strlen(g_elfsections[i].szName) + 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -620,9 +614,9 @@ int calculate_outsize(void)
|
|||||||
mem_size = top_addr;
|
mem_size = top_addr;
|
||||||
}
|
}
|
||||||
|
|
||||||
out_sects++;
|
|
||||||
str_size += strlen(g_elfsections[i].szName) + 1;
|
str_size += strlen(g_elfsections[i].szName) + 1;
|
||||||
}
|
}
|
||||||
|
out_sects++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -762,11 +756,13 @@ void output_sh(unsigned char *data)
|
|||||||
SW(&shdr->sh_addralign, g_elfsections[i].iAddralign);
|
SW(&shdr->sh_addralign, g_elfsections[i].iAddralign);
|
||||||
SW(&shdr->sh_entsize, g_elfsections[i].iEntsize);
|
SW(&shdr->sh_entsize, g_elfsections[i].iEntsize);
|
||||||
|
|
||||||
if(((g_elfsections[i].iType == SHT_REL) || (g_elfsections[i].iType == SHT_PRXRELOC))
|
if((g_elfsections[i].iType == SHT_REL) || (g_elfsections[i].iType == SHT_PRXRELOC))
|
||||||
&& (g_elfsections[g_elfsections[i].iInfo].iFlags & SHF_ALLOC))
|
|
||||||
{
|
{
|
||||||
SW(&shdr->sh_type, SHT_PRXRELOC);
|
SW(&shdr->sh_type, SHT_PRXRELOC);
|
||||||
SW(&shdr->sh_info, g_elfsections[i].pRef->iIndex);
|
if (g_elfsections[i].pRef)
|
||||||
|
SW(&shdr->sh_info, g_elfsections[i].pRef->iIndex);
|
||||||
|
else
|
||||||
|
SW(&shdr->sh_info, 0);
|
||||||
SW(&shdr->sh_offset, reloc_ofs);
|
SW(&shdr->sh_offset, reloc_ofs);
|
||||||
reloc_ofs += g_elfsections[i].iSize;
|
reloc_ofs += g_elfsections[i].iSize;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user