[llvm] 75af9da - [MC][ELF] Error for sh_type, sh_flags or sh_entsize change

Joerg Sonnenberger via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 4 18:00:24 PST 2020


On Wed, Mar 04, 2020 at 04:49:52PM -0800, Fāng-ruì Sòng wrote:
> On Wed, Mar 4, 2020 at 4:37 PM Joerg Sonnenberger <joerg at bec.de> wrote:
> 
> > On Wed, Mar 04, 2020 at 04:25:36PM -0800, Fāng-ruì Sòng wrote:
> > > It is already non-trivial to write assembly portable on x86-32 and x86-64
> > >
> > > .section .eh_frame,"a", at progbits # 32
> > > .section .eh_frame,"a", at unwind # 64
> > >
> > > Writing .eh_frame manually does not seem very correct.
> >
> > So far, @progbits worked everywhere. Can't even find a test case in
> > binutils for @unwind. As such, this seems to be a move in the wrong
> > direction.
> >
> > Joerg
> >
> 
> I don't agree. .eh_frame contents for x86-32 and x86-64 are different.
> There is hardly any scenario where .eh_frame must be written in an assembly
> file.
> Writing @unwind is really a very small effort.

There is at least one scenario and that's referencing the beginning or
end of .eh_frame. So far, only MIPS needed some special casing depending
on whether ro .eh_frame is necessary. IMO it is even questionable
whether @unwind is correct in first place, @progbits is perfectly
sensible as flag.

Joerg


More information about the llvm-commits mailing list