Menu

#170 unneccesary "one-byte relocation attempted" error

open
nobody
None
5
2010-03-19
2010-03-15
Anonymous
No

when assembling "db external_symbol" the assembler quits on error, although this is possible, at least when using gnu elf extensions for relocation (and for example "push byte external_symbol" assembles just fine.)

Tested with nasm v2.08 on osX

Disabling the test at assemble.c:368 seems to work for me and generate working code.

Discussion

  • Cyrill Gorcunov

    Cyrill Gorcunov - 2010-03-18

    Thanks for report. Will take a look as only get spare time.

     
  • H. Peter Anvin

    H. Peter Anvin - 2010-03-19

    This is quite a bit more complicated than disabling a test. The backends don't support generate the requisite relocations.

     
  • H. Peter Anvin

    H. Peter Anvin - 2010-03-19

    To support the important subcase of relative relocations, we'd also need a new backend atom, OUT_REL1ADR.

     
  • H. Peter Anvin

    H. Peter Anvin - 2010-03-19

    In the case of ELF32, there is no support for generating R_386_8 or R_386_PC8 relocations at the moment.

     
  • H. Peter Anvin

    H. Peter Anvin - 2010-03-19

    It's possible this "just works" in the Mach-O backend... however, other backends would have to support it too.

     
  • H. Peter Anvin

    H. Peter Anvin - 2010-03-19
    • labels: 1022311 -->
     
  • H. Peter Anvin

    H. Peter Anvin - 2010-03-19

    Changing this to a feature request.

     

Log in to post a comment.