[all-commits] [llvm/llvm-project] 01a485: [MC][WebAssembly] Fix provisional values for data ...

Sam Clegg via All-commits all-commits at lists.llvm.org
Mon Feb 8 17:00:30 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 01a48535c31169461d4eedddb48c00b79277f388
      https://github.com/llvm/llvm-project/commit/01a48535c31169461d4eedddb48c00b79277f388
  Author: Sam Clegg <sbc at chromium.org>
  Date:   2021-02-08 (Mon, 08 Feb 2021)

  Changed paths:
    M llvm/lib/MC/WasmObjectWriter.cpp
    M llvm/test/MC/WebAssembly/alias-offset.s

  Log Message:
  -----------
  [MC][WebAssembly] Fix provisional values for data alias relocations

When calculating the symbol offsets to write as provisitonal values
in object files we are only interested in the offset of the symbol
itself.  For aliases this offset already includes the offset of the
base symbol.

The testin question was added back in https://reviews.llvm.org/D87407
but I believe the expectations here were incorrect.   sym_a lives
at offset 4 and sym_b lives 4 bytes into that (should be 8).

The addresses of the 3 symbosl in this object file are:

foo  : 0
sym_a: 4
sym_b: 8

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




More information about the All-commits mailing list