Re: [REGRESSION] "efi: efistub: Convert into static library" and preparation patches

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 04/09/14 11:48, Maarten Lankhorst wrote:
If not, Ard please go ahead with option #2 above. Overkill yes, but I've
done the single __attribute__() hacks in other projects and someone
(usually me) always eventually forgets to tag some instance.

It appears we just got lucky on arm64, since we don't have any global
variables, but the issue does exist there as well.

FWIW, visibility pushing doesn't seem to work for functions declared with extern.
Following seems to get rid of all GOTPCREL:

Are you sure?  The iPXE build process relies on this:

  /* Force visibility of all symbols to "hidden", i.e. inform gcc that
   * all symbol references resolve strictly within our final binary.
   * This avoids unnecessary PLT/GOT entries on x86_64.
   *
   * This is a stronger claim than specifying "-fvisibility=hidden",
   * since it also affects symbols marked with "extern".
   */
  #ifndef ASSEMBLY
  #if __GNUC__ >= 4
  #pragma GCC visibility push(hidden)
  #endif
  #endif /* ASSEMBLY */

and https://gcc.gnu.org/wiki/Visibility states that

"#pragma GCC visibility is stronger than -fvisibility; it affects extern declarations as well. -fvisibility only affects definitions, so that existing code can be recompiled with minimal changes. This is more true for C than C++; C++ interfaces tend use classes, which are affected by -fvisibility."

Michael

--
To unsubscribe from this list: send the line "unsubscribe linux-efi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux