NASM Forum > Programming with NASM

Disable relocation, or specify constant to WRT?

<< < (2/2)

Frank Kotler:
Hi anyfoo,

I dunno. My example segfaults because there's no physical
memory mapped to virtual zero, where my variable is. No surprise.

I'm not too surprised that ld balks at a 16-bit relocation, but I don't know much about the inner workings of ld. My attempt to use wrt got a message that ld didn't use wrt "that way". It uses "wrt got" or "wrt plt", ect. If your environment has a Global Offset Table and/or a Procedure Llnkage Table, maybe you could use them?

Perhaps you could modify the code in outelf,c to not generate a relocation entry in certain cases, I don't know what ld would think about that.

I think you're really over my head here. I doubt if I''m going to be able to help you much...

Best,
Frank


Navigation

[0] Message Index

[*] Previous page

Go to full version