Menu

Specifying load address

Leslie
2013-07-06
2013-07-07
  • Leslie

    Leslie - 2013-07-06

    Both wasm/wlink, and their jw counterparts, do the same thing - which is that, if I try to specify a load address of 0x30000 by using either an org 0x30000 in the source code, or the order option on the linker command line, I get an elf output file with 0x30000 worth of zeros in in it.

    At this stage I was just testing to see how the assembler and linker would cope, so the output should have been a file of just a few hundred bytes.

    For some reason this doesn't seem to happen with something like an org 0x100000000. I guess an assembler/linker internal variable must be wrapping round, to produce a reasonable file size, rather than one of 1Gb or more.

    Of course, I could write a utility to strip out the crud, and adjust the memory image size drastically downwards, but it is still a nuisance.

     

    Last edit: Leslie 2013-07-06
  • japheth

    japheth - 2013-07-07

    You can't set the load address with the ORG directive.

    The recommended way to set the load address in [j]wlink is to use OPTION OFFSET=xxx.

     

Log in to post a comment.