[PATCH] D28626: RFC: Generalize inverted gc dependencies

Rafael Avila de Espindola via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 27 12:40:31 PST 2017


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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: t.diff
Type: text/x-patch
Size: 1574 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170127/73dd9590/attachment.bin>


More information about the llvm-commits mailing list