File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change 93
93
// RUN: wasm-ld -pie --experimental-pic --emit-relocs --no-gc-sections -o %t3 %t.o -L%t.dir -Bstatic -call_shared -lls
94
94
// RUN: llvm-readobj --symbols %t3 | FileCheck --check-prefix=DYNAMIC %s
95
95
96
+ /// -r implies -Bstatic and has precedence over -Bdynamic.
97
+ // RUN: wasm-ld -r -Bdynamic %t.o -L%t.dir -lls -o %t3.ro
98
+ // RUN: llvm-readobj -s -h %t3.ro | FileCheck --check-prefix=RELOCATABLE %s
99
+ // RELOCATABLE: Name: _static
100
+
96
101
.globl _start, _bar
97
102
_start:
98
103
.functype _start () -> ()
Original file line number Diff line number Diff line change @@ -406,7 +406,8 @@ void LinkerDriver::createFiles(opt::InputArgList &args) {
406
406
ctx.arg .isStatic = true ;
407
407
break ;
408
408
case OPT_Bdynamic:
409
- ctx.arg .isStatic = false ;
409
+ if (!ctx.arg .relocatable )
410
+ ctx.arg .isStatic = false ;
410
411
break ;
411
412
case OPT_whole_archive:
412
413
inWholeArchive = true ;
You can’t perform that action at this time.
0 commit comments