[llvm-commits] [patch] Add MCObjectFormat. Fix "a + (b - c)" for ELF
Rafael Espindola
espindola at google.com
Fri Oct 15 19:54:27 PDT 2010
Currently there is no good common place to add code that is object
format specific but doesn't require a full object writer to be
available. This sometimes causes code to be duplicated in for example
the ARM MachO and the X86 MachO targets. The attached patch adds a
MCObjectFormat class so that we have a single place to add code when
needed.
The patch also generalizes the HasAbsolutizedSet bit into a isAbsolute
method (now in the MCObjectFormat class). The behaviour for MachO is
the same as before, but ELF now supports things like
mov zed+(bar-foo), %eax
if bar and foo are in the same section (and produces as error if they are not).
Is the attached patch OK? What is the correct behaviour for COFF?
Thanks,
--
Rafael Ávila de Espíndola
More information about the llvm-commits
mailing list