Skip to content
Commit f4630423 authored by Alexander Richardson's avatar Alexander Richardson
Browse files

[ELF][MIPS] Fix crash in LLD when linking code that needs PIC thunks

Summary:
The bug triggers when the following conditions are met:
    - A thunk is created in a given input section S
    - A linker script is specified
    - There is at least one matcher in the linker script .text section output
      that does not match any of the sections in the input files, before the matcher
      that matches section S.

The issue was found when linking the FreeBSD kernel for MIPS when built
with -fPIC. Patch by Alfredo Mazzinghi.

Reviewers: ruiu, psmith, atanasyan

Reviewed By: ruiu

Subscribers: peter.smith, emaste, sdardis, krytarowski, llvm-commits

Differential Revision: https://reviews.llvm.org/D40174

llvm-svn: 318653
parent 12e3a588
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment