This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Is there a way to detect a null reference function pointer during assembly or linking ?


Is there a way to detect a null reference function pointer during
assembly or linking ?

In fact, the target to which I ported Binutils always generate
position-independent-code; so it is not always loaded at the address
specified in the ELF header, and that is where I run into issues; the
value of a null reference function pointer is not null when the
executable is not loaded at the address specified in the ELF header,
because that value is computed by offsetting a constant value from the
start of the section .text.

I would like to be able to detect a null reference function pointer,
and generate an instruction that load a null immediate value instead
of computing the null reference function pointer value by offsetting a
constant value.

Any pointers would be much appreciated.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]