[PATCH] [COFF] Add support for .secref and .offset directives
Rafael Ávila de Espíndola
rafael.espindola at gmail.com
Fri Dec 20 07:37:36 PST 2013
================
Comment at: lib/MC/MCAssembler.cpp:947
@@ -939,1 +946,3 @@
+bool MCAssembler::relaxCoffStaticOffsetFragment(
+ MCAsmLayout &Layout, MCCoffStaticOffsetFragment &LDF) {
----------------
Since the size is fixed, this shouldn't need to be part of the relaxation.
Relaxation exits for things that can change size depending on where other stuff is. For example, a short branch can become a long one and a uleb might need another byte if things more far apart.
What prevents this from being just a data fragment with a relocation to get the correct value?
Follow how llvm-mc implements:
--------------
foo:
.zero 4
.zero 4
bar:
zed = bar - foo
-------------------
http://llvm-reviews.chandlerc.com/D2445
More information about the llvm-commits
mailing list