[RFC] imgrel/imagerel operator from the clang integrated assembler and the Microsoft assembler

Jan Beulich jbeulich@suse.com
Tue Nov 12 09:27:16 GMT 2024


On 12.11.2024 09:24, Julian Waters wrote:
> My mistake, I just checked and it is indeed not human written, but instead
> was the output of the Intel C Compiler. The source code that the assembly
> came from is proprietary and involves Intel C extensions, and so is not
> accessible to anyone outside of Intel (Which unfortunately includes me). I
> don't know the right people to talk to at Intel to get them to regenerate
> the assembly for GAS targeting Windows COFF. Now that I see it, it
> certainly is odd that imagerel is being used inside an instruction only to
> be added to __ImageBase later on (The uses of imagerel elsewhere can be
> replaced with .rva so aren't a concern). I'll try to ask why this is the
> case, but no guarantees that I'll ever get a reply

You may want to try asking in their ISA extensions forum [1]. No guarantees
for an answer, but perhaps worth a try in the absence of known better
alternatives.

> To clarify about the .reloc example, I was wondering whether it relied on
> the current location that is being assembled into. The . means the current
> address in the assembler, no? If it does, then the offset that should
> be subtracted from . as in the example may differ depending on the
> instruction

Of course. As said, quite a bit of care is needed when using .reloc.

Jan

[1] https://community.intel.com/t5/Intel-ISA-Extensions/bd-p/isa-extensions



More information about the Binutils mailing list