[all-commits] [llvm/llvm-project] 288082: [ELF] Move SHT_REL/SHT_RELA handling from createIn...

Fangrui Song via All-commits all-commits at lists.llvm.org
Tue Jan 18 23:32:04 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 288082d45d6124a7f818f6a44feec7780fbc4c52
      https://github.com/llvm/llvm-project/commit/288082d45d6124a7f818f6a44feec7780fbc4c52
  Author: Fangrui Song <i at maskray.me>
  Date:   2022-01-18 (Tue, 18 Jan 2022)

  Changed paths:
    M lld/ELF/InputFiles.cpp
    M lld/ELF/InputFiles.h
    M lld/test/ELF/invalid/bad-reloc-target.test
    M lld/test/ELF/invalid/multiple-relocations-sections.test

  Log Message:
  -----------
  [ELF] Move SHT_REL/SHT_RELA handling from createInputSection to initializeSections

This simplifies the code a bit. While here,

* change the `multiple relocation sections` diagnostic from `fatal` to `error` and include the relocated section name.
* drop less useful name from `getRelocTarget`. Without -r/--emit-relocs we don't need to get SHT_REL/SHT_RELA names.




More information about the All-commits mailing list