Fix module loading on arm after the metadata.c unification in r329190.
Arm modules need an additional address fixup not needed by other platforms.
This commit is contained in:
parent
b5cdd987a8
commit
7feea4075b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=330131
@ -265,6 +265,7 @@ md_copymodules(vm_offset_t addr, int kern64)
|
|||||||
struct preloaded_file *fp;
|
struct preloaded_file *fp;
|
||||||
struct file_metadata *md;
|
struct file_metadata *md;
|
||||||
uint64_t scratch64;
|
uint64_t scratch64;
|
||||||
|
uint32_t scratch32;
|
||||||
int c;
|
int c;
|
||||||
|
|
||||||
c = addr != 0;
|
c = addr != 0;
|
||||||
@ -281,7 +282,11 @@ md_copymodules(vm_offset_t addr, int kern64)
|
|||||||
scratch64 = fp->f_size;
|
scratch64 = fp->f_size;
|
||||||
MOD_SIZE(addr, scratch64, c);
|
MOD_SIZE(addr, scratch64, c);
|
||||||
} else {
|
} else {
|
||||||
MOD_ADDR(addr, fp->f_addr, c);
|
scratch32 = fp->f_addr;
|
||||||
|
#ifdef __arm__
|
||||||
|
scratch32 -= __elfN(relocation_offset);
|
||||||
|
#endif
|
||||||
|
MOD_ADDR(addr, scratch32, c);
|
||||||
MOD_SIZE(addr, fp->f_size, c);
|
MOD_SIZE(addr, fp->f_size, c);
|
||||||
}
|
}
|
||||||
for (md = fp->f_metadata; md != NULL; md = md->md_next) {
|
for (md = fp->f_metadata; md != NULL; md = md->md_next) {
|
||||||
|
Loading…
Reference in New Issue
Block a user