* For portability reasons change cle_addr from pointer type.
This commit is contained in:
parent
f7908e332f
commit
ffb90bfe40
3 changed files with 12 additions and 11 deletions
|
@ -26,7 +26,7 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)$Id: cmod.c,v 1.1 2007/01/05 18:01:06 bg- Exp $
|
||||
* @(#)$Id: cmod.c,v 1.2 2007/04/25 15:37:41 bg- Exp $
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
@ -90,18 +90,18 @@ cmod_load(unsigned imod,
|
|||
*/
|
||||
h.data = cmod_module[imod].ram;
|
||||
h.bss = h.data + h.datasize;
|
||||
h.text = h.bss + h.bsssize;
|
||||
h.text = (cle_addr)h.bss + h.bsssize;
|
||||
|
||||
PRINTF("cmod: copy text segment to RAM %p %p\n",
|
||||
h.text, h.text + h.textsize);
|
||||
ret = pread(h.text, h.textsize, off + h.textoff);
|
||||
ret = pread((void *)h.text, h.textsize, off + h.textoff);
|
||||
assert(ret > 0);
|
||||
if(h.textrelasize > 0) {
|
||||
PRINTF("cmod: relocate text in RAM\n");
|
||||
ret = cle_relocate(&h,
|
||||
pread,
|
||||
off,
|
||||
h.text,
|
||||
(void *)h.text,
|
||||
h.textrelaoff, h.textrelasize);
|
||||
if(ret != CLE_OK) {
|
||||
strcpy(scratch, h.name);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue