[PATCH] D123283: [MC] Improve st_size propagation rule

Adhemerval Zanella via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 7 11:11:33 PDT 2022


zatrazz added a comment.

I tested this patch on my glibc clang branch and while it has fixed the st_value aliases issues, it now triggers another regression:

  $ cat /tmp/test.S 
  .symver __GLIBC_2_1_sys_nerr, sys_nerr at GLIBC_2.2.5
  .symver __GLIBC_2_1__sys_nerr, _sys_nerr at GLIBC_2.2.5
  
                                          # End of file scope inline assembly
          .type   __GLIBC_2_1_sys_nerr, at object    # @__GLIBC_2_1_sys_nerr
          .section        .rodata,"a", at progbits
          .globl  __GLIBC_2_1_sys_nerr
          .p2align        2
  __GLIBC_2_1_sys_nerr:
          .long   125                             # 0x7d
          .size   __GLIBC_2_1_sys_nerr, 4
  
          .globl  __GLIBC_2_1__sys_nerr
  .set __GLIBC_2_1__sys_nerr, __GLIBC_2_1_sys_nerr
  $ clang /tmp/test.S -c -o /tmp/test-clang.os
  $ $ readelf -s /tmp/test-clang.os  | grep _sys_nerr@
       4: 0000000000000000     0 OBJECT  GLOBAL DEFAULT    3 _sys_nerr at GLIBC_2.2.5

It should have the size '4' instead of '0'.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D123283/new/

https://reviews.llvm.org/D123283



More information about the llvm-commits mailing list