[all-commits] [llvm/llvm-project] 7a781f: [LLD][ELF][AVR] Propagate ELF flags to the linked ...
LemonBoy via All-commits
all-commits at lists.llvm.org
Fri Apr 16 01:40:37 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 7a781fb692975ded33ff86c06f838fe904e706f8
https://github.com/llvm/llvm-project/commit/7a781fb692975ded33ff86c06f838fe904e706f8
Author: LemonBoy <thatlemon at gmail.com>
Date: 2021-04-16 (Fri, 16 Apr 2021)
Changed paths:
M lld/ELF/Arch/AVR.cpp
A lld/test/ELF/avr-flags.s
Log Message:
-----------
[LLD][ELF][AVR] Propagate ELF flags to the linked image
The `e_flags` for a ELF file targeting the AVR ISA contains two fields at the time of writing:
- A 7-bit integer field specifying the ISA revision being targeted
- A 1-bit flag specifying whether the object files being linked are suited for applying the relaxations at link time
The linked ELF file is blessed with the arch revision shared among all the files.
The behaviour in case of mismatch is purposefully different than the one implemented in libbfd: LLD will raise a fatal error while libbfd silently picks a default value of `avr2`.
The relaxation-ready flag is handled as done by libbfd, in order for it to appear in the linked object every source object must be tagged with it.
Reviewed By: MaskRay
Differential Revision: https://reviews.llvm.org/D99754
More information about the All-commits
mailing list