[PATCH] [COFF] Add support for .secref and .offset directives
Timur Iskhodzhanov
timurrrr at google.com
Fri Dec 20 08:31:46 PST 2013
2013/12/20 Rafael Ávila de Espíndola <rafael.espindola at gmail.com>:
>
>
> ================
> 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.
Sorry, I am still very unfamiliar with the MC part of the codebase, I
mostly worked on the Clang part last year.
Thanks for the clarification, I've also looked at the code and I think
now I have at least a vague idea of what relaxations are :)
> What prevents this from being just a data fragment with a relocation to get the correct value?
It's just that I'm not familiar with the codebase.
> Follow how llvm-mc implements:
>
> --------------
> foo:
> .zero 4
> .zero 4
> bar:
> zed = bar - foo
> -------------------
Thanks for the pointer, looking.
More information about the llvm-commits
mailing list