[PATCH] D28626: RFC: Generalize inverted gc dependencies

Robert Lytton via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 28 07:00:34 PST 2017


LGTM
Thank you
Robert
________________________________________
From: Rafael Avila de Espindola [rafael.espindola at gmail.com]
Sent: 27 January 2017 20:40
To: Robert Lytton; reviews+D28626+public+0a7e58a8570fa72f at reviews.llvm.org; rnk at google.com; eugenis at google.com; peter at pcc.me.uk; ruiu at google.com
Cc: chisophugis at gmail.com; llvm-commits at lists.llvm.org; Peter Hedinger
Subject: RE: [PATCH] D28626: RFC: Generalize inverted gc dependencies

Robert Lytton <robert at xmos.com> writes:

> Hi Rafael,
>
> The ABI marks both the section name and the section flags with information regarding if data is in the  const or data pool. viz:
>     .section .dp.data,"awd", at progbits
>     .section .cp.rodata,"ac", at progbits
> The assembler and linker use the section flags (the '.dp.data' name is only a visual aid).

Excellent, using a flag is the correct way to do these things on ELF.

> #define SHF_MASKOS           0x0ff00000
> #define SHF_MASKPROC         0xf0000000
> #define SHF_ELIMINATABLE     0x00100000
> #define SHF_REORDER          0x00200000
> #define SHF_DP               0x10000000
> #define SHF_CP               0x20000000
> #define SHF_ASS              0x40000000
>
> I believe it would be reasonable when we next pull from llvm upstream (major release) to:
> 1. Change the elf  literals for SHF_DP & SHF_CP.
> 2. Extend the section flags understood by the assembler viz 'D' and 'C'  (alias of 'd' and 'c').
> 3. Have llvm emit 'D' and 'C' in the xcore assembler - and never 'd' or 'c'.
>
> Is this enough? Or is the problem the use of the section flags, period.
> Not using the section flags would break  backwards compatibility as well as adding unknown risks.

So, if I understand correctly, everything is OK on your
assembler/linker as the used values are in SHF_MASKPROC.

So is the attached patch just changing llvm to use the correct values
OK?

Cheers,
Rafael



More information about the llvm-commits mailing list