[llvm-dev] binutils extensions: (1) dependency list in .a (2) SHF_GNU_RETAIN for GC roots in linking

Fangrui Song via llvm-dev llvm-dev at lists.llvm.org
Tue Sep 29 14:58:44 PDT 2020


I have recently seen two GNU binutils/GNU ABI extensions on binutils at sourceware.org
They may potentially affect LLD and LLVM binary utilities, so I bring them
to your attention:)

https://sourceware.org/pipermail/binutils/2020-September/

(1) "dependency list for static libraries  "
   This adds a special member __.LIBDEP to an archive to represent
   something similar to DT_NEEDED in a shared object.

   This currently affects ar. ld is supposed to be affected but there is
   no patch yet. This may affect llvm-ar and LLD.

   I have one reply at https://sourceware.org/pipermail/binutils/2020-September/113444.html
   You can click "Next message" to get the author's response.

(2) "[PATCH] Support SHF_GNU_RETAIN ELF section flag" and
     "[PATCH v2] Support for SHF_GNU_RETAIN ELF Section Flag"

   Basically, add a new section flag from SHF_MASKOS bits to express that
   a section has GC root semantics (ld --gc-sections).
   People mentioned GCC __attribute__((used)) could use this and the
   author appears to be working on it (but a reply says that the frontend
   feature do not need to hold up this proposal, so there is risk that it
   is committed before the design is done).

   This may affect Clang, LLVM's integrated assembler and LLD.

   I have one reply at https://sourceware.org/pipermail/binutils/2020-September/113527.html
   (main points: (a) there are several alternative forms, e.g. SHT_GROUP, a
   new SHT_* for GC root (b) the way they design the new section flag
   adds one exception to "gas: error for section type, attr, or entsize
   change")


Many people may not be subscribed to binutils at sourceware.org
If you want to reply with proper In-Reply-To: , you can get Message-ID:
from https://sourceware.org/pipermail/binutils/2020-September.txt.gz
Though I think you may simply reply with Re: $original_subject


More information about the llvm-dev mailing list