
Using Max for both "PIC Level" and "PIE Level" is inconsistent. PIC imposes less restriction while PIE imposes more restriction. The result generally picks the more restrictive behavior: Min for PIC. This choice matches `ld -r`: a non-pic object and a pic object merge into a result which should be treated as non-pic. To allow linking "PIC Level" using Error/Max from old bitcode files, upgrade Error/Max to Min. Reviewed By: tejohnson Differential Revision: https://reviews.llvm.org/D130531
16 lines
672 B
LLVM
16 lines
672 B
LLVM
; RUN: llvm-as < %s | llvm-dis | FileCheck %s
|
|
; RUN: verify-uselistorder < %s
|
|
|
|
!llvm.module.flags = !{!0, !1, !2, !3}
|
|
|
|
!0 = !{i32 1, !"PIC Level", i32 1}
|
|
!1 = !{i32 1, !"PIE Level", i32 1}
|
|
!2 = !{i32 1, !"Objective-C Image Info Version", i32 0}
|
|
!3 = !{i32 1, !"Objective-C Image Info Section", !"__DATA, __objc_imageinfo, regular, no_dead_strip"}
|
|
|
|
; CHECK: !0 = !{i32 8, !"PIC Level", i32 1}
|
|
; CHECK: !1 = !{i32 7, !"PIE Level", i32 1}
|
|
; CHECK: !2 = !{i32 1, !"Objective-C Image Info Version", i32 0}
|
|
; CHECK: !3 = !{i32 1, !"Objective-C Image Info Section", !"__DATA,__objc_imageinfo,regular,no_dead_strip"}
|
|
; CHECK: !4 = !{i32 4, !"Objective-C Class Properties", i32 0}
|