#334 new
stsp

add SEG support

Reported by stsp | December 4th, 2018 @ 11:49 AM

Currently nasm allows SEG directive
to get a symbol segment. nasm supports this
only for OMF, and yasm doesn't support OMF.
However, the new relocations types are already
implemented in ia16-elf-ld, and will likely
soon appear in normal ld and in nasm.

Their author writes:

I added some "ELF" relocation types to binutils-ia16 to specifically support MZ relocations, so that under ia16-elf-as you can write, say,

.hword foo .reloc ., R_386_SEGMENT16, foo .hword 0

to emit a far pointer to a foo symbol. (And indeed this is similar to what ia16-elf-gcc does to emit pointers to far variables.)

If you wish to stick with nasm, one possible way would be to manually populate the .msdos_mz_reloc segment with the actual MZ relocation entries --- you can do this --- though naturally this will not be very neat. Alas, nasm most probably does not know about the special relocation types.

It would be good if yasm can add that support
before nasm did. :)

Comments and changes to this ticket

  • stsp

    stsp December 4th, 2018 @ 11:50 AM

    Damn formatting...
    Trying again with the quote.

    I added some "ELF" relocation types to binutils-ia16 to specifically support MZ relocations,
    so that under ia16-elf-as you can write, say,
    
    .hword foo
    .reloc ., R_386_SEGMENT16, foo
    .hword 0
    
    to emit a far pointer to a foo symbol. (And indeed this is similar to what ia16-elf-gcc
    does to emit pointers to far variables.)
    
    If you wish to stick with nasm, one possible way would be to manually populate the .msdos_mz_reloc
    segment with the actual MZ relocation entries --- you can do this --- though naturally this will not
    be very neat. Alas, nasm most probably does not know about the special relocation types.
    
  • muneebkhatri

    muneebkhatri December 6th, 2018 @ 06:43 AM

    I will really appreciate the writer's choice for choosing this excellent article appropriate to my matter.Here is deep description about the article matter which helped me more. dissertation writing uk

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

The Yasm Modular Assembler Project

Shared Ticket Bins

People watching this ticket

Pages