diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2016-08-26 02:55:39 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2016-08-26 02:55:39 +0200 |
commit | 12576ff7afd71799d9cc6fe6af065932540ff0ea (patch) | |
tree | 352670843d1bc9389193f7b947f08b51f91689ac /libdiskfs/init-first.c | |
parent | ca5b01f538c122dc1f0e989f5703c75b8cf8ca3a (diff) |
Fix loading small pic programs
It happens that the link script for ld.so contains a hole, which might thus
leave an empty page between the text and the data. When loading a small pic
program, its text would then fit in there, and loading the data right after
it would fail. We here rather force all pic loads to be mapped
contiguously, starting from the place that was allocated for the first pic
load.
* exec/exec.c (load_section): Return the address of the end of the section.
(load): Take the address to be used for loading pic objects as parameter,
force pic objects there if it is not zero, and compute and return the
address to be used for the next pic object.
(do_exec): Pass addresses for pic loads between calls to load().
Diffstat (limited to 'libdiskfs/init-first.c')
0 files changed, 0 insertions, 0 deletions