[Mesa-dev] [PATCH] R600: Use SHT_PROGBITS for the .AMDGPU.config section

Eric Christopher echristo at gmail.com
Tue Apr 23 10:20:03 PDT 2013


Seems reasonable.

-eric

On Tue, Apr 23, 2013 at 4:50 PM, Tom Stellard <tom at stellard.net> wrote:
> From: Tom Stellard <thomas.stellard at amd.com>
>
> The libelf implementation that is distributed here:
> http://www.mr511.de/software/english.html
> will not parse sections that are marked SHT_NULL.
> ---
>  lib/Target/R600/AMDGPUAsmPrinter.cpp | 2 +-
>  test/CodeGen/R600/elf.ll             | 1 +
>  2 files changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/lib/Target/R600/AMDGPUAsmPrinter.cpp b/lib/Target/R600/AMDGPUAsmPrinter.cpp
> index d8a380d..0d05e36 100644
> --- a/lib/Target/R600/AMDGPUAsmPrinter.cpp
> +++ b/lib/Target/R600/AMDGPUAsmPrinter.cpp
> @@ -58,7 +58,7 @@ bool AMDGPUAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
>
>    const MCSectionELF *ConfigSection = getObjFileLowering().getContext()
>                                                .getELFSection(".AMDGPU.config",
> -                                              ELF::SHT_NULL, 0,
> +                                              ELF::SHT_PROGBITS, 0,
>                                                SectionKind::getReadOnly());
>    OutStreamer.SwitchSection(ConfigSection);
>    if (STM.device()->getGeneration() > AMDGPUDeviceInfo::HD6XXX) {
> diff --git a/test/CodeGen/R600/elf.ll b/test/CodeGen/R600/elf.ll
> index 555ee3d..dbe3b1f 100644
> --- a/test/CodeGen/R600/elf.ll
> +++ b/test/CodeGen/R600/elf.ll
> @@ -3,6 +3,7 @@
>
>  ; ELF-CHECK: Format: ELF32
>  ; ELF-CHECK: Name: .AMDGPU.config
> +; ELF-CHECK: Type: SHT_PROGBITS
>
>  ; CONFIG-CHECK: .section .AMDGPU.config
>  ; CONFIG-CHECK-NEXT: .long   45096
> --
> 1.7.11.4
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


More information about the mesa-dev mailing list