* [PATCH 1/1] ldconfig-native: Add 64-bit flag for ELF64 entries
@ 2015-04-28 7:46 Yuanjie Huang
2015-04-28 11:08 ` Richard Purdie
2015-07-01 3:19 ` wenzong fan
0 siblings, 2 replies; 6+ messages in thread
From: Yuanjie Huang @ 2015-04-28 7:46 UTC (permalink / raw)
To: openembedded-core
From: Yuanjie Huang <yuanjie.huang@windriver.com>
ldconfig-native was grepped from an old version of glibc, and its output
lacks neccessary 64bit flag in entries.
Due to this defect, ctypes.util.find_library() python function fails to
detect any library due to the old file format that ldconfig-native
creates. This fix sets architecture-dependent 64bit flags for 64-bit ELF.
Since the host's elf.h may not have definition for new AArch64 machine
type, a work-around is added to correctly flag 64-bit ARM libraries.
Signed-off-by: Yuanjie Huang <yuanjie.huang@windriver.com>
---
.../add-64-bit-flag-for-ELF64-entries.patch | 103 +++++++++++++++++++++
meta/recipes-core/glibc/ldconfig-native_2.12.1.bb | 1 +
2 files changed, 104 insertions(+)
create mode 100644 meta/recipes-core/glibc/ldconfig-native-2.12.1/add-64-bit-flag-for-ELF64-entries.patch
diff --git a/meta/recipes-core/glibc/ldconfig-native-2.12.1/add-64-bit-flag-for-ELF64-entries.patch b/meta/recipes-core/glibc/ldconfig-native-2.12.1/add-64-bit-flag-for-ELF64-entries.patch
new file mode 100644
index 0000000..d42f7a1
--- /dev/null
+++ b/meta/recipes-core/glibc/ldconfig-native-2.12.1/add-64-bit-flag-for-ELF64-entries.patch
@@ -0,0 +1,103 @@
+From 9d62544090b08849218cd1fc52a36cdd5d90363e Mon Sep 17 00:00:00 2001
+From: Yuanjie Huang <yuanjie.huang@windriver.com>
+Date: Fri, 24 Apr 2015 03:29:31 +0000
+Subject: [PATCH] Add 64-bit flag for ELF64 entries.
+
+ldconfig-native was grepped from an old version of glibc, and its output
+lacks neccessary 64bit flag in entries.
+Due to this defect, ctypes.util.find_library() python function fails to
+detect any library due to the old file format that ldconfig-native
+creates. This fix sets architecture-dependent 64bit flags for 64-bit ELF.
+
+Signed-off-by: Yuanjie Huang <yuanjie.huang@windriver.com>
+---
+ cache.c | 4 ++++
+ ldconfig.h | 4 ++++
+ readelflib.c | 34 ++++++++++++++++++++++++++++++++++
+ 3 files changed, 42 insertions(+)
+
+diff --git a/cache.c b/cache.c
+index a904d44..c4f5411 100644
+--- a/cache.c
++++ b/cache.c
+@@ -121,6 +121,10 @@ print_entry (const char *lib, int flag, unsigned int osversion,
+ break;
+ case FLAG_MIPS64_LIBN64:
+ fputs (",64bit", stdout);
++ break;
++ case FLAG_AARCH64_LIB64:
++ fputs (",AArch64", stdout);
++ break;
+ case 0:
+ break;
+ default:
+diff --git a/ldconfig.h b/ldconfig.h
+index fadd5ec..6a8a750 100644
+--- a/ldconfig.h
++++ b/ldconfig.h
+@@ -34,6 +34,10 @@
+ #define FLAG_POWERPC_LIB64 0x0500
+ #define FLAG_MIPS64_LIBN32 0x0600
+ #define FLAG_MIPS64_LIBN64 0x0700
++#define FLAG_X8664_LIBX32 0x0800
++#define FLAG_ARM_LIBHF 0x0900
++#define FLAG_AARCH64_LIB64 0x0a00
++#define FLAG_ARM_LIBSF 0x0b00
+
+ /* Name of auxiliary cache. */
+ #define _PATH_LDCONFIG_AUX_CACHE "/var/cache/ldconfig/aux-cache"
+diff --git a/readelflib.c b/readelflib.c
+index 0bf0de3..6e87afc 100644
+--- a/readelflib.c
++++ b/readelflib.c
+@@ -28,6 +28,11 @@
+
+ #include "endian_extra.h"
+
++/* Work-around for old host that does not have AArch64 defined in elf.h. */
++#ifndef EM_AARCH64
++#define EM_AARCH64 183 /* ARM AARCH64 */
++#endif
++
+ #undef check_ptr
+ #define check_ptr(ptr) \
+ do \
+@@ -290,6 +295,35 @@ process_elf_file64 (const char *file_name, const char *lib, int *flag,
+ libc5/libc6. */
+ *flag = FLAG_ELF;
+
++ /* Set flags according to information in ELF header to align with target
++ ldconfig */
++ switch (elf_header->e_machine)
++ {
++ case EM_IA_64:
++ *flag |= FLAG_IA64_LIB64;
++ break;
++ case EM_X86_64:
++ *flag |= FLAG_X8664_LIB64;
++ break;
++ case EM_S390:
++ *flag |= FLAG_S390_LIB64;
++ break;
++ case EM_PPC64:
++ *flag |= FLAG_POWERPC_LIB64;
++ break;
++ case EM_MIPS:
++ case EM_MIPS_RS3_LE:
++ *flag |= FLAG_MIPS64_LIBN64;
++ break;
++ case EM_AARCH64:
++ *flag |= FLAG_AARCH64_LIB64;
++ break;
++ default:
++ error(0, 0, "%s is a 64-bit ELF for unknown machine %lx\n",
++ file_name, (long)elf_header->e_machine);
++ break;
++ }
++
+ loadaddr = -1;
+ dynamic_addr = 0;
+ dynamic_size = 0;
+--
+1.8.5.2.233.g932f7e4
+
diff --git a/meta/recipes-core/glibc/ldconfig-native_2.12.1.bb b/meta/recipes-core/glibc/ldconfig-native_2.12.1.bb
index 7c34635..8a2ea90 100644
--- a/meta/recipes-core/glibc/ldconfig-native_2.12.1.bb
+++ b/meta/recipes-core/glibc/ldconfig-native_2.12.1.bb
@@ -12,6 +12,7 @@ SRC_URI = "file://ldconfig-native-2.12.1.tar.bz2 \
file://flag_fix.patch \
file://endianess-header.patch \
file://ldconfig-default-to-all-multilib-dirs.patch \
+ file://add-64-bit-flag-for-ELF64-entries.patch \
"
PR = "r2"
--
1.8.5.2.233.g932f7e4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/1] ldconfig-native: Add 64-bit flag for ELF64 entries
2015-04-28 7:46 [PATCH 1/1] ldconfig-native: Add 64-bit flag for ELF64 entries Yuanjie Huang
@ 2015-04-28 11:08 ` Richard Purdie
2015-04-30 2:13 ` Huang, Yuanjie
2015-07-01 3:19 ` wenzong fan
1 sibling, 1 reply; 6+ messages in thread
From: Richard Purdie @ 2015-04-28 11:08 UTC (permalink / raw)
To: Yuanjie Huang; +Cc: openembedded-core
On Tue, 2015-04-28 at 15:46 +0800, Yuanjie Huang wrote:
> From: Yuanjie Huang <yuanjie.huang@windriver.com>
>
> ldconfig-native was grepped from an old version of glibc, and its output
> lacks neccessary 64bit flag in entries.
> Due to this defect, ctypes.util.find_library() python function fails to
> detect any library due to the old file format that ldconfig-native
> creates. This fix sets architecture-dependent 64bit flags for 64-bit ELF.
>
> Since the host's elf.h may not have definition for new AArch64 machine
> type, a work-around is added to correctly flag 64-bit ARM libraries.
>
> Signed-off-by: Yuanjie Huang <yuanjie.huang@windriver.com>
> ---
> .../add-64-bit-flag-for-ELF64-entries.patch | 103 +++++++++++++++++++++
> meta/recipes-core/glibc/ldconfig-native_2.12.1.bb | 1 +
> 2 files changed, 104 insertions(+)
> create mode 100644 meta/recipes-core/glibc/ldconfig-native-2.12.1/add-64-bit-flag-for-ELF64-entries.patch
>
> diff --git a/meta/recipes-core/glibc/ldconfig-native-2.12.1/add-64-bit-flag-for-ELF64-entries.patch b/meta/recipes-core/glibc/ldconfig-native-2.12.1/add-64-bit-flag-for-ELF64-entries.patch
> new file mode 100644
> index 0000000..d42f7a1
> --- /dev/null
> +++ b/meta/recipes-core/glibc/ldconfig-native-2.12.1/add-64-bit-flag-for-ELF64-entries.patch
> @@ -0,0 +1,103 @@
> +From 9d62544090b08849218cd1fc52a36cdd5d90363e Mon Sep 17 00:00:00 2001
> +From: Yuanjie Huang <yuanjie.huang@windriver.com>
> +Date: Fri, 24 Apr 2015 03:29:31 +0000
> +Subject: [PATCH] Add 64-bit flag for ELF64 entries.
> +
> +ldconfig-native was grepped from an old version of glibc, and its output
> +lacks neccessary 64bit flag in entries.
> +Due to this defect, ctypes.util.find_library() python function fails to
> +detect any library due to the old file format that ldconfig-native
> +creates. This fix sets architecture-dependent 64bit flags for 64-bit ELF.
> +
> +Signed-off-by: Yuanjie Huang <yuanjie.huang@windriver.com>
> +---
> + cache.c | 4 ++++
> + ldconfig.h | 4 ++++
> + readelflib.c | 34 ++++++++++++++++++++++++++++++++++
> + 3 files changed, 42 insertions(+)
> +
> +diff --git a/cache.c b/cache.c
> +index a904d44..c4f5411 100644
> +--- a/cache.c
> ++++ b/cache.c
> +@@ -121,6 +121,10 @@ print_entry (const char *lib, int flag, unsigned int osversion,
> + break;
> + case FLAG_MIPS64_LIBN64:
> + fputs (",64bit", stdout);
> ++ break;
> ++ case FLAG_AARCH64_LIB64:
> ++ fputs (",AArch64", stdout);
> ++ break;
> + case 0:
> + break;
> + default:
> +diff --git a/ldconfig.h b/ldconfig.h
> +index fadd5ec..6a8a750 100644
> +--- a/ldconfig.h
> ++++ b/ldconfig.h
> +@@ -34,6 +34,10 @@
> + #define FLAG_POWERPC_LIB64 0x0500
> + #define FLAG_MIPS64_LIBN32 0x0600
> + #define FLAG_MIPS64_LIBN64 0x0700
> ++#define FLAG_X8664_LIBX32 0x0800
> ++#define FLAG_ARM_LIBHF 0x0900
> ++#define FLAG_AARCH64_LIB64 0x0a00
> ++#define FLAG_ARM_LIBSF 0x0b00
> +
> + /* Name of auxiliary cache. */
> + #define _PATH_LDCONFIG_AUX_CACHE "/var/cache/ldconfig/aux-cache"
> +diff --git a/readelflib.c b/readelflib.c
> +index 0bf0de3..6e87afc 100644
> +--- a/readelflib.c
> ++++ b/readelflib.c
> +@@ -28,6 +28,11 @@
> +
> + #include "endian_extra.h"
> +
> ++/* Work-around for old host that does not have AArch64 defined in elf.h. */
> ++#ifndef EM_AARCH64
> ++#define EM_AARCH64 183 /* ARM AARCH64 */
> ++#endif
> ++
> + #undef check_ptr
> + #define check_ptr(ptr) \
> + do \
> +@@ -290,6 +295,35 @@ process_elf_file64 (const char *file_name, const char *lib, int *flag,
> + libc5/libc6. */
> + *flag = FLAG_ELF;
> +
> ++ /* Set flags according to information in ELF header to align with target
> ++ ldconfig */
> ++ switch (elf_header->e_machine)
> ++ {
> ++ case EM_IA_64:
> ++ *flag |= FLAG_IA64_LIB64;
> ++ break;
> ++ case EM_X86_64:
> ++ *flag |= FLAG_X8664_LIB64;
> ++ break;
> ++ case EM_S390:
> ++ *flag |= FLAG_S390_LIB64;
> ++ break;
> ++ case EM_PPC64:
> ++ *flag |= FLAG_POWERPC_LIB64;
> ++ break;
> ++ case EM_MIPS:
> ++ case EM_MIPS_RS3_LE:
> ++ *flag |= FLAG_MIPS64_LIBN64;
> ++ break;
> ++ case EM_AARCH64:
> ++ *flag |= FLAG_AARCH64_LIB64;
> ++ break;
> ++ default:
> ++ error(0, 0, "%s is a 64-bit ELF for unknown machine %lx\n",
> ++ file_name, (long)elf_header->e_machine);
> ++ break;
> ++ }
> ++
> + loadaddr = -1;
> + dynamic_addr = 0;
> + dynamic_size = 0;
> +--
> +1.8.5.2.233.g932f7e4
> +
> diff --git a/meta/recipes-core/glibc/ldconfig-native_2.12.1.bb b/meta/recipes-core/glibc/ldconfig-native_2.12.1.bb
> index 7c34635..8a2ea90 100644
> --- a/meta/recipes-core/glibc/ldconfig-native_2.12.1.bb
> +++ b/meta/recipes-core/glibc/ldconfig-native_2.12.1.bb
> @@ -12,6 +12,7 @@ SRC_URI = "file://ldconfig-native-2.12.1.tar.bz2 \
> file://flag_fix.patch \
> file://endianess-header.patch \
> file://ldconfig-default-to-all-multilib-dirs.patch \
> + file://add-64-bit-flag-for-ELF64-entries.patch \
> "
>
> PR = "r2"
The patch doesn't seem to apply against master? Master appears to have
an additional patch than the list above?
Cheers,
Richard
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/1] ldconfig-native: Add 64-bit flag for ELF64 entries
2015-04-28 11:08 ` Richard Purdie
@ 2015-04-30 2:13 ` Huang, Yuanjie
0 siblings, 0 replies; 6+ messages in thread
From: Huang, Yuanjie @ 2015-04-30 2:13 UTC (permalink / raw)
To: Richard Purdie; +Cc: openembedded-core
[-- Attachment #1: Type: text/plain, Size: 5713 bytes --]
Sorry I was on the wrong tree and was one patch behind. Please see the
revised patch.
Best,
Yuanjie
On 04/28/2015 07:08 PM, Richard Purdie wrote:
> On Tue, 2015-04-28 at 15:46 +0800, Yuanjie Huang wrote:
>> From: Yuanjie Huang <yuanjie.huang@windriver.com>
>>
>> ldconfig-native was grepped from an old version of glibc, and its output
>> lacks neccessary 64bit flag in entries.
>> Due to this defect, ctypes.util.find_library() python function fails to
>> detect any library due to the old file format that ldconfig-native
>> creates. This fix sets architecture-dependent 64bit flags for 64-bit ELF.
>>
>> Since the host's elf.h may not have definition for new AArch64 machine
>> type, a work-around is added to correctly flag 64-bit ARM libraries.
>>
>> Signed-off-by: Yuanjie Huang <yuanjie.huang@windriver.com>
>> ---
>> .../add-64-bit-flag-for-ELF64-entries.patch | 103 +++++++++++++++++++++
>> meta/recipes-core/glibc/ldconfig-native_2.12.1.bb | 1 +
>> 2 files changed, 104 insertions(+)
>> create mode 100644 meta/recipes-core/glibc/ldconfig-native-2.12.1/add-64-bit-flag-for-ELF64-entries.patch
>>
>> diff --git a/meta/recipes-core/glibc/ldconfig-native-2.12.1/add-64-bit-flag-for-ELF64-entries.patch b/meta/recipes-core/glibc/ldconfig-native-2.12.1/add-64-bit-flag-for-ELF64-entries.patch
>> new file mode 100644
>> index 0000000..d42f7a1
>> --- /dev/null
>> +++ b/meta/recipes-core/glibc/ldconfig-native-2.12.1/add-64-bit-flag-for-ELF64-entries.patch
>> @@ -0,0 +1,103 @@
>> +From 9d62544090b08849218cd1fc52a36cdd5d90363e Mon Sep 17 00:00:00 2001
>> +From: Yuanjie Huang <yuanjie.huang@windriver.com>
>> +Date: Fri, 24 Apr 2015 03:29:31 +0000
>> +Subject: [PATCH] Add 64-bit flag for ELF64 entries.
>> +
>> +ldconfig-native was grepped from an old version of glibc, and its output
>> +lacks neccessary 64bit flag in entries.
>> +Due to this defect, ctypes.util.find_library() python function fails to
>> +detect any library due to the old file format that ldconfig-native
>> +creates. This fix sets architecture-dependent 64bit flags for 64-bit ELF.
>> +
>> +Signed-off-by: Yuanjie Huang <yuanjie.huang@windriver.com>
>> +---
>> + cache.c | 4 ++++
>> + ldconfig.h | 4 ++++
>> + readelflib.c | 34 ++++++++++++++++++++++++++++++++++
>> + 3 files changed, 42 insertions(+)
>> +
>> +diff --git a/cache.c b/cache.c
>> +index a904d44..c4f5411 100644
>> +--- a/cache.c
>> ++++ b/cache.c
>> +@@ -121,6 +121,10 @@ print_entry (const char *lib, int flag, unsigned int osversion,
>> + break;
>> + case FLAG_MIPS64_LIBN64:
>> + fputs (",64bit", stdout);
>> ++ break;
>> ++ case FLAG_AARCH64_LIB64:
>> ++ fputs (",AArch64", stdout);
>> ++ break;
>> + case 0:
>> + break;
>> + default:
>> +diff --git a/ldconfig.h b/ldconfig.h
>> +index fadd5ec..6a8a750 100644
>> +--- a/ldconfig.h
>> ++++ b/ldconfig.h
>> +@@ -34,6 +34,10 @@
>> + #define FLAG_POWERPC_LIB64 0x0500
>> + #define FLAG_MIPS64_LIBN32 0x0600
>> + #define FLAG_MIPS64_LIBN64 0x0700
>> ++#define FLAG_X8664_LIBX32 0x0800
>> ++#define FLAG_ARM_LIBHF 0x0900
>> ++#define FLAG_AARCH64_LIB64 0x0a00
>> ++#define FLAG_ARM_LIBSF 0x0b00
>> +
>> + /* Name of auxiliary cache. */
>> + #define _PATH_LDCONFIG_AUX_CACHE "/var/cache/ldconfig/aux-cache"
>> +diff --git a/readelflib.c b/readelflib.c
>> +index 0bf0de3..6e87afc 100644
>> +--- a/readelflib.c
>> ++++ b/readelflib.c
>> +@@ -28,6 +28,11 @@
>> +
>> + #include "endian_extra.h"
>> +
>> ++/* Work-around for old host that does not have AArch64 defined in elf.h. */
>> ++#ifndef EM_AARCH64
>> ++#define EM_AARCH64 183 /* ARM AARCH64 */
>> ++#endif
>> ++
>> + #undef check_ptr
>> + #define check_ptr(ptr) \
>> + do \
>> +@@ -290,6 +295,35 @@ process_elf_file64 (const char *file_name, const char *lib, int *flag,
>> + libc5/libc6. */
>> + *flag = FLAG_ELF;
>> +
>> ++ /* Set flags according to information in ELF header to align with target
>> ++ ldconfig */
>> ++ switch (elf_header->e_machine)
>> ++ {
>> ++ case EM_IA_64:
>> ++ *flag |= FLAG_IA64_LIB64;
>> ++ break;
>> ++ case EM_X86_64:
>> ++ *flag |= FLAG_X8664_LIB64;
>> ++ break;
>> ++ case EM_S390:
>> ++ *flag |= FLAG_S390_LIB64;
>> ++ break;
>> ++ case EM_PPC64:
>> ++ *flag |= FLAG_POWERPC_LIB64;
>> ++ break;
>> ++ case EM_MIPS:
>> ++ case EM_MIPS_RS3_LE:
>> ++ *flag |= FLAG_MIPS64_LIBN64;
>> ++ break;
>> ++ case EM_AARCH64:
>> ++ *flag |= FLAG_AARCH64_LIB64;
>> ++ break;
>> ++ default:
>> ++ error(0, 0, "%s is a 64-bit ELF for unknown machine %lx\n",
>> ++ file_name, (long)elf_header->e_machine);
>> ++ break;
>> ++ }
>> ++
>> + loadaddr = -1;
>> + dynamic_addr = 0;
>> + dynamic_size = 0;
>> +--
>> +1.8.5.2.233.g932f7e4
>> +
>> diff --git a/meta/recipes-core/glibc/ldconfig-native_2.12.1.bb b/meta/recipes-core/glibc/ldconfig-native_2.12.1.bb
>> index 7c34635..8a2ea90 100644
>> --- a/meta/recipes-core/glibc/ldconfig-native_2.12.1.bb
>> +++ b/meta/recipes-core/glibc/ldconfig-native_2.12.1.bb
>> @@ -12,6 +12,7 @@ SRC_URI = "file://ldconfig-native-2.12.1.tar.bz2 \
>> file://flag_fix.patch \
>> file://endianess-header.patch \
>> file://ldconfig-default-to-all-multilib-dirs.patch \
>> + file://add-64-bit-flag-for-ELF64-entries.patch \
>> "
>>
>> PR = "r2"
> The patch doesn't seem to apply against master? Master appears to have
> an additional patch than the list above?
>
> Cheers,
>
> Richard
>
[-- Attachment #2: 0001-ldconfig-native-Add-64-bit-flag-for-ELF64-entries.patch --]
[-- Type: text/x-patch, Size: 5139 bytes --]
From 3bb982232e7914a078688151630e71905f01cc49 Mon Sep 17 00:00:00 2001
From: Yuanjie Huang <yuanjie.huang@windriver.com>
Date: Mon, 27 Apr 2015 15:42:03 +0800
Subject: [PATCH] ldconfig-native: Add 64-bit flag for ELF64 entries
ldconfig-native was grepped from an old version of glibc, and its output
lacks neccessary 64bit flag in entries.
Due to this defect, ctypes.util.find_library() python function fails to
detect any library due to the old file format that ldconfig-native
creates. This fix sets architecture-dependent 64bit flags for 64-bit ELF.
Since the host's elf.h may not have definition for new AArch64 machine
type, a work-around is added to correctly flag 64-bit ARM libraries.
Signed-off-by: Yuanjie Huang <yuanjie.huang@windriver.com>
---
.../add-64-bit-flag-for-ELF64-entries.patch | 103 +++++++++++++++++++++
meta/recipes-core/glibc/ldconfig-native_2.12.1.bb | 1 +
2 files changed, 104 insertions(+)
create mode 100644 meta/recipes-core/glibc/ldconfig-native-2.12.1/add-64-bit-flag-for-ELF64-entries.patch
diff --git a/meta/recipes-core/glibc/ldconfig-native-2.12.1/add-64-bit-flag-for-ELF64-entries.patch b/meta/recipes-core/glibc/ldconfig-native-2.12.1/add-64-bit-flag-for-ELF64-entries.patch
new file mode 100644
index 0000000..d42f7a1
--- /dev/null
+++ b/meta/recipes-core/glibc/ldconfig-native-2.12.1/add-64-bit-flag-for-ELF64-entries.patch
@@ -0,0 +1,103 @@
+From 9d62544090b08849218cd1fc52a36cdd5d90363e Mon Sep 17 00:00:00 2001
+From: Yuanjie Huang <yuanjie.huang@windriver.com>
+Date: Fri, 24 Apr 2015 03:29:31 +0000
+Subject: [PATCH] Add 64-bit flag for ELF64 entries.
+
+ldconfig-native was grepped from an old version of glibc, and its output
+lacks neccessary 64bit flag in entries.
+Due to this defect, ctypes.util.find_library() python function fails to
+detect any library due to the old file format that ldconfig-native
+creates. This fix sets architecture-dependent 64bit flags for 64-bit ELF.
+
+Signed-off-by: Yuanjie Huang <yuanjie.huang@windriver.com>
+---
+ cache.c | 4 ++++
+ ldconfig.h | 4 ++++
+ readelflib.c | 34 ++++++++++++++++++++++++++++++++++
+ 3 files changed, 42 insertions(+)
+
+diff --git a/cache.c b/cache.c
+index a904d44..c4f5411 100644
+--- a/cache.c
++++ b/cache.c
+@@ -121,6 +121,10 @@ print_entry (const char *lib, int flag, unsigned int osversion,
+ break;
+ case FLAG_MIPS64_LIBN64:
+ fputs (",64bit", stdout);
++ break;
++ case FLAG_AARCH64_LIB64:
++ fputs (",AArch64", stdout);
++ break;
+ case 0:
+ break;
+ default:
+diff --git a/ldconfig.h b/ldconfig.h
+index fadd5ec..6a8a750 100644
+--- a/ldconfig.h
++++ b/ldconfig.h
+@@ -34,6 +34,10 @@
+ #define FLAG_POWERPC_LIB64 0x0500
+ #define FLAG_MIPS64_LIBN32 0x0600
+ #define FLAG_MIPS64_LIBN64 0x0700
++#define FLAG_X8664_LIBX32 0x0800
++#define FLAG_ARM_LIBHF 0x0900
++#define FLAG_AARCH64_LIB64 0x0a00
++#define FLAG_ARM_LIBSF 0x0b00
+
+ /* Name of auxiliary cache. */
+ #define _PATH_LDCONFIG_AUX_CACHE "/var/cache/ldconfig/aux-cache"
+diff --git a/readelflib.c b/readelflib.c
+index 0bf0de3..6e87afc 100644
+--- a/readelflib.c
++++ b/readelflib.c
+@@ -28,6 +28,11 @@
+
+ #include "endian_extra.h"
+
++/* Work-around for old host that does not have AArch64 defined in elf.h. */
++#ifndef EM_AARCH64
++#define EM_AARCH64 183 /* ARM AARCH64 */
++#endif
++
+ #undef check_ptr
+ #define check_ptr(ptr) \
+ do \
+@@ -290,6 +295,35 @@ process_elf_file64 (const char *file_name, const char *lib, int *flag,
+ libc5/libc6. */
+ *flag = FLAG_ELF;
+
++ /* Set flags according to information in ELF header to align with target
++ ldconfig */
++ switch (elf_header->e_machine)
++ {
++ case EM_IA_64:
++ *flag |= FLAG_IA64_LIB64;
++ break;
++ case EM_X86_64:
++ *flag |= FLAG_X8664_LIB64;
++ break;
++ case EM_S390:
++ *flag |= FLAG_S390_LIB64;
++ break;
++ case EM_PPC64:
++ *flag |= FLAG_POWERPC_LIB64;
++ break;
++ case EM_MIPS:
++ case EM_MIPS_RS3_LE:
++ *flag |= FLAG_MIPS64_LIBN64;
++ break;
++ case EM_AARCH64:
++ *flag |= FLAG_AARCH64_LIB64;
++ break;
++ default:
++ error(0, 0, "%s is a 64-bit ELF for unknown machine %lx\n",
++ file_name, (long)elf_header->e_machine);
++ break;
++ }
++
+ loadaddr = -1;
+ dynamic_addr = 0;
+ dynamic_size = 0;
+--
+1.8.5.2.233.g932f7e4
+
diff --git a/meta/recipes-core/glibc/ldconfig-native_2.12.1.bb b/meta/recipes-core/glibc/ldconfig-native_2.12.1.bb
index 1debf8e..93c0b18 100644
--- a/meta/recipes-core/glibc/ldconfig-native_2.12.1.bb
+++ b/meta/recipes-core/glibc/ldconfig-native_2.12.1.bb
@@ -13,6 +13,7 @@ SRC_URI = "file://ldconfig-native-2.12.1.tar.bz2 \
file://endianess-header.patch \
file://ldconfig-default-to-all-multilib-dirs.patch \
file://endian-ness_handling_fix.patch \
+ file://add-64-bit-flag-for-ELF64-entries.patch \
"
PR = "r2"
--
2.3.6
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/1] ldconfig-native: Add 64-bit flag for ELF64 entries
2015-04-28 7:46 [PATCH 1/1] ldconfig-native: Add 64-bit flag for ELF64 entries Yuanjie Huang
2015-04-28 11:08 ` Richard Purdie
@ 2015-07-01 3:19 ` wenzong fan
2015-07-01 8:58 ` Huang, Yuanjie
1 sibling, 1 reply; 6+ messages in thread
From: wenzong fan @ 2015-07-01 3:19 UTC (permalink / raw)
To: Yuanjie Huang, openembedded-core
Hi Yuanjie,
Could you resend your patch with "Upstream-status:xxx"?
Please send the V2 patch directly w/o attachment.
Thanks
Wenzong
On 04/28/2015 03:46 PM, Yuanjie Huang wrote:
> From: Yuanjie Huang <yuanjie.huang@windriver.com>
>
> ldconfig-native was grepped from an old version of glibc, and its output
> lacks neccessary 64bit flag in entries.
> Due to this defect, ctypes.util.find_library() python function fails to
> detect any library due to the old file format that ldconfig-native
> creates. This fix sets architecture-dependent 64bit flags for 64-bit ELF.
>
> Since the host's elf.h may not have definition for new AArch64 machine
> type, a work-around is added to correctly flag 64-bit ARM libraries.
>
> Signed-off-by: Yuanjie Huang <yuanjie.huang@windriver.com>
> ---
> .../add-64-bit-flag-for-ELF64-entries.patch | 103 +++++++++++++++++++++
> meta/recipes-core/glibc/ldconfig-native_2.12.1.bb | 1 +
> 2 files changed, 104 insertions(+)
> create mode 100644 meta/recipes-core/glibc/ldconfig-native-2.12.1/add-64-bit-flag-for-ELF64-entries.patch
>
> diff --git a/meta/recipes-core/glibc/ldconfig-native-2.12.1/add-64-bit-flag-for-ELF64-entries.patch b/meta/recipes-core/glibc/ldconfig-native-2.12.1/add-64-bit-flag-for-ELF64-entries.patch
> new file mode 100644
> index 0000000..d42f7a1
> --- /dev/null
> +++ b/meta/recipes-core/glibc/ldconfig-native-2.12.1/add-64-bit-flag-for-ELF64-entries.patch
> @@ -0,0 +1,103 @@
> +From 9d62544090b08849218cd1fc52a36cdd5d90363e Mon Sep 17 00:00:00 2001
> +From: Yuanjie Huang <yuanjie.huang@windriver.com>
> +Date: Fri, 24 Apr 2015 03:29:31 +0000
> +Subject: [PATCH] Add 64-bit flag for ELF64 entries.
> +
> +ldconfig-native was grepped from an old version of glibc, and its output
> +lacks neccessary 64bit flag in entries.
> +Due to this defect, ctypes.util.find_library() python function fails to
> +detect any library due to the old file format that ldconfig-native
> +creates. This fix sets architecture-dependent 64bit flags for 64-bit ELF.
> +
> +Signed-off-by: Yuanjie Huang <yuanjie.huang@windriver.com>
> +---
> + cache.c | 4 ++++
> + ldconfig.h | 4 ++++
> + readelflib.c | 34 ++++++++++++++++++++++++++++++++++
> + 3 files changed, 42 insertions(+)
> +
> +diff --git a/cache.c b/cache.c
> +index a904d44..c4f5411 100644
> +--- a/cache.c
> ++++ b/cache.c
> +@@ -121,6 +121,10 @@ print_entry (const char *lib, int flag, unsigned int osversion,
> + break;
> + case FLAG_MIPS64_LIBN64:
> + fputs (",64bit", stdout);
> ++ break;
> ++ case FLAG_AARCH64_LIB64:
> ++ fputs (",AArch64", stdout);
> ++ break;
> + case 0:
> + break;
> + default:
> +diff --git a/ldconfig.h b/ldconfig.h
> +index fadd5ec..6a8a750 100644
> +--- a/ldconfig.h
> ++++ b/ldconfig.h
> +@@ -34,6 +34,10 @@
> + #define FLAG_POWERPC_LIB64 0x0500
> + #define FLAG_MIPS64_LIBN32 0x0600
> + #define FLAG_MIPS64_LIBN64 0x0700
> ++#define FLAG_X8664_LIBX32 0x0800
> ++#define FLAG_ARM_LIBHF 0x0900
> ++#define FLAG_AARCH64_LIB64 0x0a00
> ++#define FLAG_ARM_LIBSF 0x0b00
> +
> + /* Name of auxiliary cache. */
> + #define _PATH_LDCONFIG_AUX_CACHE "/var/cache/ldconfig/aux-cache"
> +diff --git a/readelflib.c b/readelflib.c
> +index 0bf0de3..6e87afc 100644
> +--- a/readelflib.c
> ++++ b/readelflib.c
> +@@ -28,6 +28,11 @@
> +
> + #include "endian_extra.h"
> +
> ++/* Work-around for old host that does not have AArch64 defined in elf.h. */
> ++#ifndef EM_AARCH64
> ++#define EM_AARCH64 183 /* ARM AARCH64 */
> ++#endif
> ++
> + #undef check_ptr
> + #define check_ptr(ptr) \
> + do \
> +@@ -290,6 +295,35 @@ process_elf_file64 (const char *file_name, const char *lib, int *flag,
> + libc5/libc6. */
> + *flag = FLAG_ELF;
> +
> ++ /* Set flags according to information in ELF header to align with target
> ++ ldconfig */
> ++ switch (elf_header->e_machine)
> ++ {
> ++ case EM_IA_64:
> ++ *flag |= FLAG_IA64_LIB64;
> ++ break;
> ++ case EM_X86_64:
> ++ *flag |= FLAG_X8664_LIB64;
> ++ break;
> ++ case EM_S390:
> ++ *flag |= FLAG_S390_LIB64;
> ++ break;
> ++ case EM_PPC64:
> ++ *flag |= FLAG_POWERPC_LIB64;
> ++ break;
> ++ case EM_MIPS:
> ++ case EM_MIPS_RS3_LE:
> ++ *flag |= FLAG_MIPS64_LIBN64;
> ++ break;
> ++ case EM_AARCH64:
> ++ *flag |= FLAG_AARCH64_LIB64;
> ++ break;
> ++ default:
> ++ error(0, 0, "%s is a 64-bit ELF for unknown machine %lx\n",
> ++ file_name, (long)elf_header->e_machine);
> ++ break;
> ++ }
> ++
> + loadaddr = -1;
> + dynamic_addr = 0;
> + dynamic_size = 0;
> +--
> +1.8.5.2.233.g932f7e4
> +
> diff --git a/meta/recipes-core/glibc/ldconfig-native_2.12.1.bb b/meta/recipes-core/glibc/ldconfig-native_2.12.1.bb
> index 7c34635..8a2ea90 100644
> --- a/meta/recipes-core/glibc/ldconfig-native_2.12.1.bb
> +++ b/meta/recipes-core/glibc/ldconfig-native_2.12.1.bb
> @@ -12,6 +12,7 @@ SRC_URI = "file://ldconfig-native-2.12.1.tar.bz2 \
> file://flag_fix.patch \
> file://endianess-header.patch \
> file://ldconfig-default-to-all-multilib-dirs.patch \
> + file://add-64-bit-flag-for-ELF64-entries.patch \
> "
>
> PR = "r2"
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/1] ldconfig-native: Add 64-bit flag for ELF64 entries
2015-07-01 3:19 ` wenzong fan
@ 2015-07-01 8:58 ` Huang, Yuanjie
2015-07-01 9:29 ` wenzong fan
0 siblings, 1 reply; 6+ messages in thread
From: Huang, Yuanjie @ 2015-07-01 8:58 UTC (permalink / raw)
To: wenzong fan, openembedded-core
Hi Wenzong,
This package is created by OE-core from glibc source, so there's no
upstream for it...
Best,
Yuanjie
On 07/01/2015 11:19 AM, wenzong fan wrote:
> Hi Yuanjie,
>
> Could you resend your patch with "Upstream-status:xxx"?
>
> Please send the V2 patch directly w/o attachment.
>
> Thanks
> Wenzong
>
> On 04/28/2015 03:46 PM, Yuanjie Huang wrote:
>> From: Yuanjie Huang <yuanjie.huang@windriver.com>
>>
>> ldconfig-native was grepped from an old version of glibc, and its output
>> lacks neccessary 64bit flag in entries.
>> Due to this defect, ctypes.util.find_library() python function fails to
>> detect any library due to the old file format that ldconfig-native
>> creates. This fix sets architecture-dependent 64bit flags for 64-bit
>> ELF.
>>
>> Since the host's elf.h may not have definition for new AArch64 machine
>> type, a work-around is added to correctly flag 64-bit ARM libraries.
>>
>> Signed-off-by: Yuanjie Huang <yuanjie.huang@windriver.com>
>> ---
>> .../add-64-bit-flag-for-ELF64-entries.patch | 103
>> +++++++++++++++++++++
>> meta/recipes-core/glibc/ldconfig-native_2.12.1.bb | 1 +
>> 2 files changed, 104 insertions(+)
>> create mode 100644
>> meta/recipes-core/glibc/ldconfig-native-2.12.1/add-64-bit-flag-for-ELF64-entries.patch
>>
>> diff --git
>> a/meta/recipes-core/glibc/ldconfig-native-2.12.1/add-64-bit-flag-for-ELF64-entries.patch
>> b/meta/recipes-core/glibc/ldconfig-native-2.12.1/add-64-bit-flag-for-ELF64-entries.patch
>>
>> new file mode 100644
>> index 0000000..d42f7a1
>> --- /dev/null
>> +++
>> b/meta/recipes-core/glibc/ldconfig-native-2.12.1/add-64-bit-flag-for-ELF64-entries.patch
>> @@ -0,0 +1,103 @@
>> +From 9d62544090b08849218cd1fc52a36cdd5d90363e Mon Sep 17 00:00:00 2001
>> +From: Yuanjie Huang <yuanjie.huang@windriver.com>
>> +Date: Fri, 24 Apr 2015 03:29:31 +0000
>> +Subject: [PATCH] Add 64-bit flag for ELF64 entries.
>> +
>> +ldconfig-native was grepped from an old version of glibc, and its
>> output
>> +lacks neccessary 64bit flag in entries.
>> +Due to this defect, ctypes.util.find_library() python function fails to
>> +detect any library due to the old file format that ldconfig-native
>> +creates. This fix sets architecture-dependent 64bit flags for 64-bit
>> ELF.
>> +
>> +Signed-off-by: Yuanjie Huang <yuanjie.huang@windriver.com>
>> +---
>> + cache.c | 4 ++++
>> + ldconfig.h | 4 ++++
>> + readelflib.c | 34 ++++++++++++++++++++++++++++++++++
>> + 3 files changed, 42 insertions(+)
>> +
>> +diff --git a/cache.c b/cache.c
>> +index a904d44..c4f5411 100644
>> +--- a/cache.c
>> ++++ b/cache.c
>> +@@ -121,6 +121,10 @@ print_entry (const char *lib, int flag,
>> unsigned int osversion,
>> + break;
>> + case FLAG_MIPS64_LIBN64:
>> + fputs (",64bit", stdout);
>> ++ break;
>> ++ case FLAG_AARCH64_LIB64:
>> ++ fputs (",AArch64", stdout);
>> ++ break;
>> + case 0:
>> + break;
>> + default:
>> +diff --git a/ldconfig.h b/ldconfig.h
>> +index fadd5ec..6a8a750 100644
>> +--- a/ldconfig.h
>> ++++ b/ldconfig.h
>> +@@ -34,6 +34,10 @@
>> + #define FLAG_POWERPC_LIB64 0x0500
>> + #define FLAG_MIPS64_LIBN32 0x0600
>> + #define FLAG_MIPS64_LIBN64 0x0700
>> ++#define FLAG_X8664_LIBX32 0x0800
>> ++#define FLAG_ARM_LIBHF 0x0900
>> ++#define FLAG_AARCH64_LIB64 0x0a00
>> ++#define FLAG_ARM_LIBSF 0x0b00
>> +
>> + /* Name of auxiliary cache. */
>> + #define _PATH_LDCONFIG_AUX_CACHE "/var/cache/ldconfig/aux-cache"
>> +diff --git a/readelflib.c b/readelflib.c
>> +index 0bf0de3..6e87afc 100644
>> +--- a/readelflib.c
>> ++++ b/readelflib.c
>> +@@ -28,6 +28,11 @@
>> +
>> + #include "endian_extra.h"
>> +
>> ++/* Work-around for old host that does not have AArch64 defined in
>> elf.h. */
>> ++#ifndef EM_AARCH64
>> ++#define EM_AARCH64 183 /* ARM AARCH64 */
>> ++#endif
>> ++
>> + #undef check_ptr
>> + #define check_ptr(ptr) \
>> + do \
>> +@@ -290,6 +295,35 @@ process_elf_file64 (const char *file_name,
>> const char *lib, int *flag,
>> + libc5/libc6. */
>> + *flag = FLAG_ELF;
>> +
>> ++ /* Set flags according to information in ELF header to align with
>> target
>> ++ ldconfig */
>> ++ switch (elf_header->e_machine)
>> ++ {
>> ++ case EM_IA_64:
>> ++ *flag |= FLAG_IA64_LIB64;
>> ++ break;
>> ++ case EM_X86_64:
>> ++ *flag |= FLAG_X8664_LIB64;
>> ++ break;
>> ++ case EM_S390:
>> ++ *flag |= FLAG_S390_LIB64;
>> ++ break;
>> ++ case EM_PPC64:
>> ++ *flag |= FLAG_POWERPC_LIB64;
>> ++ break;
>> ++ case EM_MIPS:
>> ++ case EM_MIPS_RS3_LE:
>> ++ *flag |= FLAG_MIPS64_LIBN64;
>> ++ break;
>> ++ case EM_AARCH64:
>> ++ *flag |= FLAG_AARCH64_LIB64;
>> ++ break;
>> ++ default:
>> ++ error(0, 0, "%s is a 64-bit ELF for unknown machine %lx\n",
>> ++ file_name, (long)elf_header->e_machine);
>> ++ break;
>> ++ }
>> ++
>> + loadaddr = -1;
>> + dynamic_addr = 0;
>> + dynamic_size = 0;
>> +--
>> +1.8.5.2.233.g932f7e4
>> +
>> diff --git a/meta/recipes-core/glibc/ldconfig-native_2.12.1.bb
>> b/meta/recipes-core/glibc/ldconfig-native_2.12.1.bb
>> index 7c34635..8a2ea90 100644
>> --- a/meta/recipes-core/glibc/ldconfig-native_2.12.1.bb
>> +++ b/meta/recipes-core/glibc/ldconfig-native_2.12.1.bb
>> @@ -12,6 +12,7 @@ SRC_URI = "file://ldconfig-native-2.12.1.tar.bz2 \
>> file://flag_fix.patch \
>> file://endianess-header.patch \
>> file://ldconfig-default-to-all-multilib-dirs.patch \
>> + file://add-64-bit-flag-for-ELF64-entries.patch \
>> "
>>
>> PR = "r2"
>>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/1] ldconfig-native: Add 64-bit flag for ELF64 entries
2015-07-01 8:58 ` Huang, Yuanjie
@ 2015-07-01 9:29 ` wenzong fan
0 siblings, 0 replies; 6+ messages in thread
From: wenzong fan @ 2015-07-01 9:29 UTC (permalink / raw)
To: Huang, Yuanjie, openembedded-core
On 07/01/2015 04:58 PM, Huang, Yuanjie wrote:
> Hi Wenzong,
>
> This package is created by OE-core from glibc source, so there's no
> upstream for it...
It should include "Upstream-status: Inappropriate [...]" if there's no
upstream, please refer to:
http://openembedded.org/wiki/Commit_Patch_Message_Guidelines#Patch_Header_Recommendations
Thanks
Wenzong
>
> Best,
> Yuanjie
>
> On 07/01/2015 11:19 AM, wenzong fan wrote:
>> Hi Yuanjie,
>>
>> Could you resend your patch with "Upstream-status:xxx"?
>>
>> Please send the V2 patch directly w/o attachment.
>>
>> Thanks
>> Wenzong
>>
>> On 04/28/2015 03:46 PM, Yuanjie Huang wrote:
>>> From: Yuanjie Huang <yuanjie.huang@windriver.com>
>>>
>>> ldconfig-native was grepped from an old version of glibc, and its output
>>> lacks neccessary 64bit flag in entries.
>>> Due to this defect, ctypes.util.find_library() python function fails to
>>> detect any library due to the old file format that ldconfig-native
>>> creates. This fix sets architecture-dependent 64bit flags for 64-bit
>>> ELF.
>>>
>>> Since the host's elf.h may not have definition for new AArch64 machine
>>> type, a work-around is added to correctly flag 64-bit ARM libraries.
>>>
>>> Signed-off-by: Yuanjie Huang <yuanjie.huang@windriver.com>
>>> ---
>>> .../add-64-bit-flag-for-ELF64-entries.patch | 103
>>> +++++++++++++++++++++
>>> meta/recipes-core/glibc/ldconfig-native_2.12.1.bb | 1 +
>>> 2 files changed, 104 insertions(+)
>>> create mode 100644
>>> meta/recipes-core/glibc/ldconfig-native-2.12.1/add-64-bit-flag-for-ELF64-entries.patch
>>>
>>>
>>> diff --git
>>> a/meta/recipes-core/glibc/ldconfig-native-2.12.1/add-64-bit-flag-for-ELF64-entries.patch
>>> b/meta/recipes-core/glibc/ldconfig-native-2.12.1/add-64-bit-flag-for-ELF64-entries.patch
>>>
>>> new file mode 100644
>>> index 0000000..d42f7a1
>>> --- /dev/null
>>> +++
>>> b/meta/recipes-core/glibc/ldconfig-native-2.12.1/add-64-bit-flag-for-ELF64-entries.patch
>>>
>>> @@ -0,0 +1,103 @@
>>> +From 9d62544090b08849218cd1fc52a36cdd5d90363e Mon Sep 17 00:00:00 2001
>>> +From: Yuanjie Huang <yuanjie.huang@windriver.com>
>>> +Date: Fri, 24 Apr 2015 03:29:31 +0000
>>> +Subject: [PATCH] Add 64-bit flag for ELF64 entries.
>>> +
>>> +ldconfig-native was grepped from an old version of glibc, and its
>>> output
>>> +lacks neccessary 64bit flag in entries.
>>> +Due to this defect, ctypes.util.find_library() python function fails to
>>> +detect any library due to the old file format that ldconfig-native
>>> +creates. This fix sets architecture-dependent 64bit flags for 64-bit
>>> ELF.
>>> +
>>> +Signed-off-by: Yuanjie Huang <yuanjie.huang@windriver.com>
>>> +---
>>> + cache.c | 4 ++++
>>> + ldconfig.h | 4 ++++
>>> + readelflib.c | 34 ++++++++++++++++++++++++++++++++++
>>> + 3 files changed, 42 insertions(+)
>>> +
>>> +diff --git a/cache.c b/cache.c
>>> +index a904d44..c4f5411 100644
>>> +--- a/cache.c
>>> ++++ b/cache.c
>>> +@@ -121,6 +121,10 @@ print_entry (const char *lib, int flag,
>>> unsigned int osversion,
>>> + break;
>>> + case FLAG_MIPS64_LIBN64:
>>> + fputs (",64bit", stdout);
>>> ++ break;
>>> ++ case FLAG_AARCH64_LIB64:
>>> ++ fputs (",AArch64", stdout);
>>> ++ break;
>>> + case 0:
>>> + break;
>>> + default:
>>> +diff --git a/ldconfig.h b/ldconfig.h
>>> +index fadd5ec..6a8a750 100644
>>> +--- a/ldconfig.h
>>> ++++ b/ldconfig.h
>>> +@@ -34,6 +34,10 @@
>>> + #define FLAG_POWERPC_LIB64 0x0500
>>> + #define FLAG_MIPS64_LIBN32 0x0600
>>> + #define FLAG_MIPS64_LIBN64 0x0700
>>> ++#define FLAG_X8664_LIBX32 0x0800
>>> ++#define FLAG_ARM_LIBHF 0x0900
>>> ++#define FLAG_AARCH64_LIB64 0x0a00
>>> ++#define FLAG_ARM_LIBSF 0x0b00
>>> +
>>> + /* Name of auxiliary cache. */
>>> + #define _PATH_LDCONFIG_AUX_CACHE "/var/cache/ldconfig/aux-cache"
>>> +diff --git a/readelflib.c b/readelflib.c
>>> +index 0bf0de3..6e87afc 100644
>>> +--- a/readelflib.c
>>> ++++ b/readelflib.c
>>> +@@ -28,6 +28,11 @@
>>> +
>>> + #include "endian_extra.h"
>>> +
>>> ++/* Work-around for old host that does not have AArch64 defined in
>>> elf.h. */
>>> ++#ifndef EM_AARCH64
>>> ++#define EM_AARCH64 183 /* ARM AARCH64 */
>>> ++#endif
>>> ++
>>> + #undef check_ptr
>>> + #define check_ptr(ptr) \
>>> + do \
>>> +@@ -290,6 +295,35 @@ process_elf_file64 (const char *file_name,
>>> const char *lib, int *flag,
>>> + libc5/libc6. */
>>> + *flag = FLAG_ELF;
>>> +
>>> ++ /* Set flags according to information in ELF header to align with
>>> target
>>> ++ ldconfig */
>>> ++ switch (elf_header->e_machine)
>>> ++ {
>>> ++ case EM_IA_64:
>>> ++ *flag |= FLAG_IA64_LIB64;
>>> ++ break;
>>> ++ case EM_X86_64:
>>> ++ *flag |= FLAG_X8664_LIB64;
>>> ++ break;
>>> ++ case EM_S390:
>>> ++ *flag |= FLAG_S390_LIB64;
>>> ++ break;
>>> ++ case EM_PPC64:
>>> ++ *flag |= FLAG_POWERPC_LIB64;
>>> ++ break;
>>> ++ case EM_MIPS:
>>> ++ case EM_MIPS_RS3_LE:
>>> ++ *flag |= FLAG_MIPS64_LIBN64;
>>> ++ break;
>>> ++ case EM_AARCH64:
>>> ++ *flag |= FLAG_AARCH64_LIB64;
>>> ++ break;
>>> ++ default:
>>> ++ error(0, 0, "%s is a 64-bit ELF for unknown machine %lx\n",
>>> ++ file_name, (long)elf_header->e_machine);
>>> ++ break;
>>> ++ }
>>> ++
>>> + loadaddr = -1;
>>> + dynamic_addr = 0;
>>> + dynamic_size = 0;
>>> +--
>>> +1.8.5.2.233.g932f7e4
>>> +
>>> diff --git a/meta/recipes-core/glibc/ldconfig-native_2.12.1.bb
>>> b/meta/recipes-core/glibc/ldconfig-native_2.12.1.bb
>>> index 7c34635..8a2ea90 100644
>>> --- a/meta/recipes-core/glibc/ldconfig-native_2.12.1.bb
>>> +++ b/meta/recipes-core/glibc/ldconfig-native_2.12.1.bb
>>> @@ -12,6 +12,7 @@ SRC_URI = "file://ldconfig-native-2.12.1.tar.bz2 \
>>> file://flag_fix.patch \
>>> file://endianess-header.patch \
>>> file://ldconfig-default-to-all-multilib-dirs.patch \
>>> + file://add-64-bit-flag-for-ELF64-entries.patch \
>>> "
>>>
>>> PR = "r2"
>>>
>
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-07-01 9:29 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-28 7:46 [PATCH 1/1] ldconfig-native: Add 64-bit flag for ELF64 entries Yuanjie Huang
2015-04-28 11:08 ` Richard Purdie
2015-04-30 2:13 ` Huang, Yuanjie
2015-07-01 3:19 ` wenzong fan
2015-07-01 8:58 ` Huang, Yuanjie
2015-07-01 9:29 ` wenzong fan
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.