2017年10月第一次给LLVM提交patch,到2020年底已经贡献三年多了。今年~1000 commits,灌水很多,挑出一些值得一提的。
LLVM
- llvm-objdump -d:display addresses instead of PC-relative offsets
- Fix llvm-objdump --syms
- llvm-objcopy ELF:Fix
-O binary
- llvm-objcopy --only-keep-debug: support Android PT_TLS hack
- llvm-readelf --all: make output order compatible with GNU readelf
- Clean up MC, fix
.symver
visibility, fix redirection for undefined symbol - Improve DebugInfo
- Fix some new pass manager issues
- Clean up x86 MCDisassembler
- Fix x86 FastISel, negative offset folding into global address,
R_X86_64_[REX_]GOTPCRELX
problems - Fix x86/PowerPC integrated assembler issues
- Fix PowerPC combineVectorShuffle
- Support
R_X86_64_PLTOFF64
- Implement
-fpic -fno-semantic-interposition
local alias for x86 - Implement
.reloc
directive for arbitrary relocation types on many targets - Clean up/fix exception/call frame information
- Delete remnant PowerPC Mach-O code
- XRay: use PC-relative addresses, support big-endian
- Rewrite llvm-cov gcov, support all known GCC gcov versions (3.4~10), optimize/clean up (Kirichoff's circult law) gcov instrumentation
- Clean up bugpoint
- Clean up dso_local
- PGOFix critical edge split, use COMDAT, work around non-determinism
- Split
.gcc_except_table
- Fix StackColoring, BranchRelaxation, JumpThreading
Clang
- Clean up
-fuse-init-array
- Add
-mbranches-within-32B-boundaries
- Add
-flegacy-pass-manager
-fno-legacy-pass-manager
-gno-split-dwarf
- Implement
-fpatchable-function-entry=
and its associated function attribute - Implement
-march=x86-64-v[234]
- Fix builtin function asm label
- Implement
-fprofile-update={atomic,prefer-atomic,single}
- Use PowerPC ELFv2 on linux-musl and FreeBSD>=13
- Improve
-B
COMPILER_PATH
compatibility with GCC
lld
- Help implement
-z force-ibt
and-z shstk
for Intel Control-flow Enforcement Technology - Handle
.debug_*
- Implement
-z rel
and-z rela
(not meaningful) - Implement
R_PPC_COPY
和R_PPC64_COPY
- Implement PPC32 canonical PLT
- Clean up
-z pac-plt
and-z force-bti
- Implement Mach-O
X86_64_RELOC_SIGNED_{1,2,4}
- Improve diagnostics
- Detect missing R_PPC64_TLSGD/R_PPC64_TLSLD and disable TLS relaxation
- Fix
--wrap
- Improve
--warn-backrefs
, implement--warn-backrefs-exclude=
- Fix
--gdb-index
- Implement
--print-archive-stats
- Implement
--rosegment
- Support
-r --gc-sections
- Improve
SHF_LINK_ORDER
- Fix
--icf
for C++ exceptions (language-specific data area)
Misc
- Clean up compiler-rt builtins、libunwind
- Make sanitizers(asan/cfi/lsan/msan/tsan/ubsan) support musl
GCC
3 commits
Align __patchable_function_entries to POINTER_SIZE [PR93194]
libstdc++: Fix the return type of __cxa_finalize
- Because stakeholders agreed:
Don't make -gsplit-dwarf imply -g
binutils
Reported many bugs and feature requests:
- as aarch64/mips: reject symbolic operand of an instruction taking an immediate operand
- as: Omit unused STT_SECTION symbols
- as: Support 64-bit PC relative relocation (R_MIPS_PC64 via R_MIPS_PC32/R_MIPS_64/R_MIPS_NONE)
- as: [ARM] pcrel relocations referencing STB_GLOBAL symbols are resolved at assembly time
- glibc x86-64: Support -mstack-protector-guard=global (define global __stack_chk_guard)
- glibc: Get OUTPUT_FORMAT from objdump -f to support LLD
- glibc: [meta] Build glibc with LLD
- gold x86: don't relax GOTPCRELX for SHN_ABS
- gold: --export-dynamic-symbol should drop implicit -u
- gold: in --start-group, an undefined symbol in shared object does not fetch a previous archive
- ld powerpc: R_PPC_REL16_LO/R_PPC64_REL16_LO referencing a preemptible symbol should be rejected
- ld: --gc-sections -u __start_cident inconsistent for -r and non-relocatable links (I'll fix lld)
- ld: --wrap: the special rule for "undefined symbol" is incompatible with -flto or relocatable links
- ld: A definition referenced by an unneeded (--as-needed) shared object should be exported
- ld: Feature request: support .symtab .strtab and .shstrtab as output section descriptions
- ld: INSERT [AFTER|BEFORE] variant for extension purposes
- ld: Implement --[no-]apply-dynamic-relocs
- ld: Reject addresses outside [0,2**32-1] for ELFCLASS32
- ld: Should an unversioned undefined symbol use VER_NDX_GLOBAL instead of VER_NDX_LOCAL?
- ld: Suggest alternative spelling for "undefined reference" diagnostics
- ld: Support --gc-sections for SHF_MERGE sections
- ld: Support --reproduce
- ld: Should /DISCARD/ : { (.symtab) (.strtab) } work? wontfix (disagreement with LLD)
- as x86: duplicate jmp when .nops and jmp are used together invalid (there is a disagreement)
Fixed
- ld: Don't allow linking ET_EXEC fixed
- Support SHF_LINK_ORDER with sh_link=0 fixed for 2.36
- Support section flag 'o' (SHF_LINK_ORDER) fixed for 2.35
- Support section linkage 'unique' (multiple sections with the same name) fixed
- Visibility of undefined foo@v1 should constrain defined foo@@v1 fixed
- as -g: remove non-executable sections' contribution from DW_AT_ranges fixed
- as: .stab: sh_size%sh_entsize!=0 for 64-bit architectures fixed
- as: Reject (byte) .align 0x100000000 fixed
- gold: Don't relax R_X86_64_GOTPCRELX when addend != -4 fixed for 2.36
- ld/plugin.c:plugin_notice may incorrectly replace an LTO bfd_link_hash_defined with bfd_link_hash_undefweak fixed
- ld/testsuite/ld-elf symbolic tests dl4e and dl4f fail fixed
- ld: --dynamic-list* doesn't work before -Bsymbolic and -Bsymbolic-functions fixed
- ld: Duplicate "warning: changing start of section" fixed
- ld: Inconsistency for defined foo@v1 and foo@@v1 fixed
- ld: R_X86_64_PLT32 referencing .L should not emit an outstanding relocation fixed
- ld: Search for input files relative to the current linker script fixed
- ld: Spurious 'gc-sections requires either an entry or an undefined symbol' when --init or --fini is specified fixed
- ld: Support --export-dynamic-symbol $symbol fixed
- ld: Support mixed SHF_LINK_ORDER & non-SHF_LINK_ORDER components in an output section fixed
- readelf --dyn-syms: Display a warning if SHT_DYNSYM and PT_DYNAMIC disagree about the location fixed
- readelf: Add -C/--demangle option (like nm & objdump) fixed
My commits:
Allow objcopy's --set-section-flags options to add or remove the SHF_EXCLUDE flag of ELF sections.
Add support for --no-rosegment option.
The assembler only supports 32-bit stabs. So set sh_entsize unconditionally to 12.
Unify the behaviour of ld.bfd and ld.gold with respect to warning about unresolved symbol references. (PR 24613)
- ld:
For relative paths in INPUT() and GROUP(), search the directory of the current linker script before searching other paths.
objcopy: Allow --dump-section to dump an empty SEC_HAS_CONTENTS section
ld: Handle --dynamic-list* before -Bsymbolic -Bsymbolic-functions
ld: Add --export-dynamic-symbol and --export-dynamic-symbol-list
gold: Set DF_1_PIE for -pie
- gdb:
Recognize -1 as a tombstone value in .debug_line
Linux kernel
- First commit
bpf: Support llvm-objcopy for vmlinux BTF
.weak
fixes- LLVM integrated assembler related fixes