From 8943fcc31d12545043043c06c037cf6dfee14722 Mon Sep 17 00:00:00 2001 From: Sam Clegg Date: Tue, 13 Oct 2020 10:59:21 -0500 Subject: EmscriptenPIC: Remove internalization of GOT entries (#3211) wasm-ld now does this better than binaryen and does it by default when linking and executable and optionally with `-Bsymbolic` when linking a shared library. See https://reviews.llvm.org/D89152 --- test/lld/main_module_table_4.wat.out | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) (limited to 'test/lld/main_module_table_4.wat.out') diff --git a/test/lld/main_module_table_4.wat.out b/test/lld/main_module_table_4.wat.out index 809a7506e..ab25bc110 100644 --- a/test/lld/main_module_table_4.wat.out +++ b/test/lld/main_module_table_4.wat.out @@ -1,31 +1,22 @@ (module (type $none_=>_none (func)) - (type $i32_=>_none (func (param i32))) - (import "env" "table" (table $timport$9 2 funcref)) - (elem (global.get $tb) $__stdio_write) + (type $none_=>_i32 (func (result i32))) + (import "env" "table" (table $timport$9 1 funcref)) (import "env" "__stack_pointer" (global $sp_import i32)) (import "env" "__table_base" (global $tb i32)) + (import "env" "fp$__stdio_write$v" (func $fp$__stdio_write$v (result i32))) (global $gimport$9 (mut i32) (i32.const 0)) (global $global i32 (i32.const 42)) (global $sp (mut i32) (global.get $sp_import)) (export "__stdio_write" (func $__stdio_write)) (export "__data_end" (global $global)) - (export "dynCall_v" (func $dynCall_v)) (export "__assign_got_enties" (func $__assign_got_enties)) (func $__stdio_write (nop) ) (func $__assign_got_enties (global.set $gimport$9 - (i32.add - (global.get $tb) - (i32.const 0) - ) - ) - ) - (func $dynCall_v (param $fptr i32) - (call_indirect (type $none_=>_none) - (local.get $fptr) + (call $fp$__stdio_write$v) ) ) ) @@ -33,11 +24,12 @@ --BEGIN METADATA -- { "staticBump": 4294966770, - "tableSize": 2, + "tableSize": 1, "initializers": [ "__assign_got_enties" ], "declares": [ + "fp$__stdio_write$v" ], "externs": [ "___stack_pointer", @@ -45,7 +37,6 @@ ], "exports": [ "__stdio_write", - "dynCall_v", "__assign_got_enties" ], "namedGlobals": { -- cgit v1.2.3