https://sourceware.org/bugzilla/show_bug.cgi?id=21128

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ccoutant at gmail dot com,
                   |                            |tmsriram at google dot com

--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> ---
icf_safe_so_test.cc has

---
// The goal of this program is to verify if identical code folding
// in safe mode correctly folds functions in a shared object. The
// foo_* functions below should not be folded on X86_64.
// For 32-bit X86, the hidden protected and internal symbols can be folded.
// foo_glob and bar_glob should not be folded, because function pointer
// of foo_glob is taken.

int  __attribute__ ((visibility ("protected")))
foo_prot()
{
  return 1;
}

int __attribute__ ((visibility ("hidden")))
foo_hidden()
{
  return 1;
}

int __attribute__ ((visibility ("internal")))
foo_internal()
{
  return 1;
}

static int
foo_static()
{
  return 1;
}

int foo_glob()
{
  return 2;
}

int bar_glob()
{
  return 2;
}

int main()
{
  int (*p)() = foo_glob;
  (void)p;
  foo_static();
  foo_prot();
  foo_hidden();
  foo_internal();
  return 0;
}
---

I don't see why foo_hidden, foo_internal and foo_prot can't be folded for
x86-64.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to