Changes from Git (git http://labmaster3.local/git/llvm-project.git)


  1. __patchable_function_entries: don't use linkage field 'unique' with (details)
  2. [AMDGPU] Add gfx8 assembler and disassembler test cases (details)
  3. [MC][ELF] Emit a relocation if target is defined in the same section and (details)
  4. Fix "pointer is null" static analyzer warning. NFCI. (details)
Commit 7fa5290d5bd5632d7a36a4ea9f46e81e04fb819e by maskray
__patchable_function_entries: don't use linkage field 'unique' with
.section name, "flags"G, @type, GroupName[, linkage]
As of binutils 2.33, linkage cannot be 'unique'.  For integrated
assembler, we use both 'o' flag and 'unique' linkage to support
--gc-sections and COMDAT with lld.
The file was modifiedllvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
The file was modifiedllvm/test/CodeGen/AArch64/patchable-function-entry.ll
Commit 241f330d6bab52ab4e3a01cbb9a3edd417d07c59 by jay.foad
[AMDGPU] Add gfx8 assembler and disassembler test cases
Summary: This adds assembler tests for cases that were previously only
in the disassembler tests, and vice versa.
Reviewers: rampitec, arsenm, nhaehnle
Subscribers: kzhuravl, jvesely, wdng, yaxunl, dstuttard, tpr, t-tye,
jfb, llvm-commits
Tags: #llvm
Differential Revision:
The file was modifiedllvm/test/MC/Disassembler/AMDGPU/gfx8_dasm_all.txt
The file was modifiedllvm/test/MC/AMDGPU/gfx8_asm_all.s
Commit 2bfee35cb860859b436de0b780fbd00d68e198a4 by maskray
[MC][ELF] Emit a relocation if target is defined in the same section and
is non-local
For a target symbol defined in the same section, currently we don't emit
a relocation if VariantKind is VK_None (with few exceptions like RISC-V
relaxation), while GNU as emits one. This causes program behavior
differences with and without -ffunction-sections, and can break intended
symbol interposition in a -shared link.
.globl foo foo:
call foo      # no relocation. On other targets, may be written as b
foo, etc
call bar      # a relocation if bar is in another section (e.g.
call foo@plt  # a relocation
Unify these cases by always emitting a relocation. If we ever want to
optimize `call foo` in -shared links, we should emit a STB_LOCAL alias
and call via the alias.
ARM/thumb2-beq-fixup.s: we now emit a relocation to global_thumb_fn as
GNU as does. X86/Inputs/align-branch-64-2.s: we now emit R_X86_64_PLT32
to foo as GNU does.
ELF/relax.s: rewrite the test as target-in-same-section.s . We omitted
relocations to `global` and now emit R_X86_64_PLT32. Note, GNU as does
not emit a relocation for `jmp global` (maybe its own bug). Our new
behavior is compatible except `jmp global`.
Reviewed By: peter.smith
Differential Revision:
The file was modifiedlld/test/ELF/global-offset-table-position-aarch64.s
The file was modifiedllvm/test/MC/ARM/thumb2-beq-fixup.s
The file was modifiedllvm/test/MC/X86/align-branch-64-2c.s
The file was modifiedllvm/test/MC/X86/align-branch-64-2a.s
The file was removedllvm/test/MC/ELF/relax.s
The file was modifiedllvm/lib/MC/ELFObjectWriter.cpp
The file was modifiedllvm/test/MC/X86/align-branch-64-2b.s
The file was addedllvm/test/MC/ELF/target-in-same-section.s
The file was modifiedllvm/test/MC/ARM/thumb1-branch-reloc.s
Commit ada22c804cd956f3ee7cc9dc82e6d54ead8a4ffe by llvm-dev
Fix "pointer is null" static analyzer warning. NFCI.
The file was modifiedclang/include/clang/Basic/SourceManager.h