Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(144)

Issue 1241313002: Fix --filetype=iasm non-pc-rel fixup offsets (double counted). (Closed)

Created:
5 years, 5 months ago by jvoung (off chromium)
Modified:
5 years, 5 months ago
Reviewers:
Jim Stichnoth, John
CC:
native-client-reviews_googlegroups.com, ascull
Base URL:
https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Fix --filetype=iasm non-pc-rel fixup offsets (double counted). For pc-rel fixups, we have a ConstantRelocatable referring to Foo+0, and and the offset "-4" is encoded in the code buffer (but not the ConstantRelocatable object). Thus we need to load from the code buffer in order to get that "-4" instead of just taking the +0 from Foo+0. For non-pc-rel fixups, we have the ConstantRelocatable with a true offset, and we also write that offset into the code buffer (for ELF REL and not RELA, it expects the offset in the code buffer). In this case, we want to choose one and not double-count. BUG=none 176.gcc seemed to be failing when compiled with --filetype=iasm... load address for 64-bit pointers were +8 instead of +4 R=stichnot@chromium.org Committed: https://gerrit.chromium.org/gerrit/gitweb?p=native_client/pnacl-subzero.git;a=commit;h=b7db1a521f932c2b9d0b09694112ff29a51a212c

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+28 lines, -3 lines) Patch
M src/IceAssembler.cpp View 1 chunk +4 lines, -0 lines 0 comments Download
M src/IceELFSection.h View 1 chunk +2 lines, -0 lines 1 comment Download
M src/IceFixups.h View 1 chunk +1 line, -1 line 0 comments Download
M src/IceFixups.cpp View 2 chunks +3 lines, -2 lines 0 comments Download
A tests_lit/llvm2ice_tests/ias-data-reloc.ll View 1 chunk +18 lines, -0 lines 0 comments Download

Messages

Total messages: 5 (1 generated)
jvoung (off chromium)
https://codereview.chromium.org/1241313002/diff/1/src/IceELFSection.h File src/IceELFSection.h (right): https://codereview.chromium.org/1241313002/diff/1/src/IceELFSection.h#newcode370 src/IceELFSection.h:370: Rela.r_addend = Fixup.offset(); This doesn't consult the buffer's contents, ...
5 years, 5 months ago (2015-07-20 23:29:05 UTC) #2
Jim Stichnoth
Wow, I thought this used to work fine. Any idea how it broke? LGTM
5 years, 5 months ago (2015-07-21 13:14:51 UTC) #3
jvoung (off chromium)
On 2015/07/21 13:14:51, stichnot wrote: > Wow, I thought this used to work fine. Any ...
5 years, 5 months ago (2015-07-21 15:09:38 UTC) #4
jvoung (off chromium)
5 years, 5 months ago (2015-07-21 16:39:05 UTC) #5
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
b7db1a521f932c2b9d0b09694112ff29a51a212c (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698