oops. accidentally removed that... fix!

SVN revision: 9484
This commit is contained in:
Carsten Haitzler 2004-03-26 04:25:33 +00:00
parent a6ea2124d2
commit 9c7d952185
1 changed files with 28 additions and 23 deletions

View File

@ -152,30 +152,35 @@ _embryo_program_init(Embryo_Program *ep, void *code)
if ((hdr->flags & EMBRYO_FLAG_COMPACT)) return 0;
#ifdef WORDS_BIGENDIAN
/* also align all addresses in the public function, public variable and */
/* public tag tables */
fs = GETENTRY(hdr, publics, 0);
num = NUMENTRIES(hdr, publics, natives);
for (i = 0; i < num; i++)
{
embryo_swap_32(&(fs->address));
fs = (Embryo_Func_Stub *)((unsigned char *)fs + hdr->defsize);
}
fs = GETENTRY(hdr, pubvars, 0);
num = NUMENTRIES(hdr, pubvars, tags);
for (i = 0; i < num; i++)
{
embryo_swap_32(&(fs->address));
fs = (Embryo_Func_Stub *)((unsigned char *)fs + hdr->defsize);
}
fs = GETENTRY(hdr, tags, 0);
num = NUMENTRIES(hdr, tags, nametable);
for (i = 0; i < num; i++)
{
embryo_swap_32(&(fs->address));
fs = (Embryo_Func_Stub *)((unsigned char *)fs + hdr->defsize);
Embryo_Func_Stub *fs;
int i, num;
/* also align all addresses in the public function, public variable and */
/* public tag tables */
fs = GETENTRY(hdr, publics, 0);
num = NUMENTRIES(hdr, publics, natives);
for (i = 0; i < num; i++)
{
embryo_swap_32(&(fs->address));
fs = (Embryo_Func_Stub *)((unsigned char *)fs + hdr->defsize);
}
fs = GETENTRY(hdr, pubvars, 0);
num = NUMENTRIES(hdr, pubvars, tags);
for (i = 0; i < num; i++)
{
embryo_swap_32(&(fs->address));
fs = (Embryo_Func_Stub *)((unsigned char *)fs + hdr->defsize);
}
fs = GETENTRY(hdr, tags, 0);
num = NUMENTRIES(hdr, tags, nametable);
for (i = 0; i < num; i++)
{
embryo_swap_32(&(fs->address));
fs = (Embryo_Func_Stub *)((unsigned char *)fs + hdr->defsize);
}
}
#endif
ep->flags = EMBRYO_FLAG_RELOC;