aboutsummaryrefslogtreecommitdiff
path: root/packages/uClibc-ng/1.0.48/0007-libpthread-drop-protected-attribute-from-__pthread_k.patch
blob: 4d541d336b30c7f70b2eb13c8371fa0b78cc27dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
From 55840f6209cf1169b1332d262fc8a9d2108e753d Mon Sep 17 00:00:00 2001
From: Chris Packham <chris.packham@alliedtelesis.co.nz>
Date: Tue, 5 Sep 2023 21:14:32 +1200
Subject: [PATCH 7/7] libpthread: drop protected attribute from
 __pthread_key_create

Building some C++ code with uclibc-ng, binutils-2.40 and gcc-13.2.0 we
get the following error

  ld.bfd: isl_test2.o: non-canonical reference to canonical protected function `__pthread_key_create' in x86_64-multilib-linux-uclibc/sysroot/lib64/libc.so.1
  ld.bfd: failed to set dynamic section sizes: bad value

Drop the protected attribute to avoid the error.

Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
---
 libpthread/nptl/pthread_key_create.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/libpthread/nptl/pthread_key_create.c b/libpthread/nptl/pthread_key_create.c
index 6e11bbeae..87999764e 100644
--- a/libpthread/nptl/pthread_key_create.c
+++ b/libpthread/nptl/pthread_key_create.c
@@ -22,7 +22,6 @@
 
 
 int
-attribute_protected
 __pthread_key_create (
      pthread_key_t *key,
      void (*destr) (void *))
-- 
2.43.2