This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

ld: could PROVIDE_HIDDEN be replaced by PROVIDE in case of static linking?


  [Please CC me on reply, as I am not subscribed to binutils list. Thanks.]

  I'm using ld for linking executable for Cortex-M3 mocrocontroller. All
vendor libraries are compiled from sources, resulting objects are
statically linked and .text section from final ELF is flashed into MCU.
It can be assumed that I'm using default linker script from vanilla GCC
or "standard" linker script provided by CodeSourcery (it doesn't matter
for the sake of my question) -- and some symbols in linker script are
defined with PROVIDE_HIDDEN.

  In curiosity for the semantic of PROVIDE_HIDDEN directive, I've read
binutils documentation. But PROVIDE_HIDDEN section just describes
behavior and doesn't reveals the possible purpose and usecases of
directive. In further lurking for the answer I've found two relevant
messages in binutils mailing list [1] [2], which are slightly clarified
the purpose of PROVIDE_HIDDEN.

  So, as far as I've understood, PROVIDE_HIDDEN is useful for linking
with shared objects, where some standard symbols could be clashed. But
in my case (static linking, single ELF) it could be converted to PROVIDE
without any consequences. Am I right?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]