This is an archive of the discontinued LLVM Phabricator instance.

[LLD] [ELF] Result of subtracting two symbols should be absolute
Needs ReviewPublic

Authored by erickreyes on Dec 20 2017, 7:49 PM.

Details

Reviewers
ruiu
espindola
Group Reviewers
lld
Summary

When two linker script symbols are subtracted, the result should be absolute.

This is the behavior of binutils' ld.

Diff Detail

Repository
rLLD LLVM Linker

Event Timeline

erickreyes created this revision.Dec 20 2017, 7:49 PM
ruiu added inline comments.Dec 25 2017, 11:42 PM
ELF/ScriptParser.cpp
153

Please add a comment saying that subtracting two symbol values should logically should yield an absolute value and that's actually what the bfd linker produces.

espindola edited reviewers, added: espindola; removed: rafael.Mar 15 2018, 8:39 AM