[PATCH] D28626: RFC: Generalize inverted gc dependencies

Robert Lytton via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 25 01:10:10 PST 2017


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).

Our elf format uses the following section flags:
/* Section flags */
#define SHF_WRITE                   0x1
#define SHF_ALLOC                   0x2
#define SHF_EXECINSTR               0x4
#define SHF_MERGE                  0x10
#define SHF_STRINGS                0x20
#define SHF_INFO_LINK              0x40
#define SHF_LINK_ORDER             0x80
#define SHF_OS_NONCONFORMING      0x100
#define SHF_GROUP                 0x200
#define SHF_TLS                   0x400
#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.

Robert

________________________________________
From: Rafael EspĂ­ndola [rafael.espindola at gmail.com]
Sent: 24 January 2017 21:25
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
Subject: Re: [PATCH] D28626: RFC: Generalize inverted gc dependencies

So, it is not completely clear what the xmos assembler and linker use.
This patch just completely deletes the flags and leaves just the
section names.

Robert, is that what is used? If not, what are the 'c' and 'd' in

section ...,"awc", at progbits
section ...,"awd", at progbits

mapped to by the assembler?

Cheers,
Rafael



On 24 January 2017 at 14:49, Rafael Avila de Espindola
<rafael.espindola at gmail.com> wrote:
> Robert Lytton <robert at xmos.com> writes:
>
>> yes, sorry, I realised that on the way home!
>> No, we don't - they are opaque.
>> Please do refactor appropriately - thank you.
>
> Awesome. Can you share how they are represented in the .o file? I may as
> well change MC to represent them in the same way your assembler does.
>
> Cheers,
> Rafael


More information about the llvm-commits mailing list