bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug gas/27530] New: gas: Support .reloc ., 0, target


From: i at maskray dot me
Subject: [Bug gas/27530] New: gas: Support .reloc ., 0, target
Date: Sat, 06 Mar 2021 03:09:51 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=27530

            Bug ID: 27530
           Summary: gas: Support .reloc ., 0, target
           Product: binutils
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: gas
          Assignee: unassigned at sourceware dot org
          Reporter: i at maskray dot me
  Target Milestone: ---

R_*_NONE relocation types do not modify the location but can be used to
indicate a dependency between two sections. For example, ARM EHABI uses
R_ARM_NONE from an exception handling table section to the required personality
routine.

In assembly, we have to spell the relocation type name. So to support multiple
architectures, we have to dispatch on architecture macros, e.g.

#if defined(__x86_64__)
asm(".reloc ., R_X86_64_NONE, target");
#elif defined(__aarch64__)
asm(".reloc ., R_AARCH64_NONE, target");
#elif defined(__ppc64__)
asm(".reloc ., R_PPC64_NONE, target");
#endif

Note that R_*_NONE is always 0 (if an arch does not do this, it is probably
finding itself trouble), so if gas support `.reloc ., 0, target`, such
dispatching will be unnecessary.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]