[yocto] [prelink-cross][PATCH] src/rtld: Add MicroBlaze support based on glibc-2.24
Nathan Rossi
nathan at nathanrossi.com
Tue Jun 20 05:08:10 PDT 2017
On 20 June 2017 at 00:20, Mark Hatle <mark.hatle at windriver.com> wrote:
> I've merged this to the cross_prelink_staging (and master_staging, even though
> it's a no-op there). The change seems fairly obvious to me.
>
> Can you verify it is working properly as merged into cross_prelink_staging, then
> I'll move it to the full cross_prelink and master.
Tested the cross_prelink_staging branch and verified that it behaves
as expected.
Sorry I forgot to add the ChangeLog entry. However when you added it
you used 2016 for the year.
On a side note, once merged into the cross_prelink branch do you see
any issues with updating the SRCREV in oe-core?
Thanks,
Nathan
>
> --Mark
>
> On 6/19/17 8:45 AM, Nathan Rossi wrote:
>> Add definitions/config to support MicroBlaze, using glibc-2.24 as
>> reference.
>>
>> Signed-off-by: Nathan Rossi <nathan at nathanrossi.com>
>> ---
>> src/rtld/dl-tls.c | 5 +++++
>> src/rtld/rtld.c | 12 ++++++++++++
>> 2 files changed, 17 insertions(+)
>>
>> diff --git a/src/rtld/dl-tls.c b/src/rtld/dl-tls.c
>> index 8b972ff126..2da6bc5c66 100644
>> --- a/src/rtld/dl-tls.c
>> +++ b/src/rtld/dl-tls.c
>> @@ -133,6 +133,11 @@ rtld_determine_tlsoffsets (int e_machine, struct r_scope_elem *search_list)
>> tls_tcb_size = 0;
>> break;
>>
>> + case EM_MICROBLAZE:
>> + tls_dtv_at_tp = 1;
>> + tls_tcb_size = 8;
>> + break;
>> +
>> default:
>> /* Hope there's no TLS! */
>> for (i = 0; i < search_list->r_nlist; i++)
>> diff --git a/src/rtld/rtld.c b/src/rtld/rtld.c
>> index 8d7d760a57..3196981247 100644
>> --- a/src/rtld/rtld.c
>> +++ b/src/rtld/rtld.c
>> @@ -215,6 +215,15 @@ parse_opt (int key, char *arg, struct argp_state *state)
>> | (((type) == R_NIOS2_COPY) * ELF_RTYPE_CLASS_COPY) \
>> | (((type) == R_NIOS2_GLOB_DAT) * ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA(EM_ALTERA_NIOS2)))
>>
>> +/* From glibc-2.24: sysdeps/microblaze/dl-machine.h */
>> +# define microblaze_elf_machine_type_class(type) \
>> + (((type) == R_MICROBLAZE_JUMP_SLOT || \
>> + (type) == R_MICROBLAZE_TLSDTPREL32 || \
>> + (type) == R_MICROBLAZE_TLSDTPMOD32 || \
>> + (type) == R_MICROBLAZE_TLSTPREL32) \
>> + * ELF_RTYPE_CLASS_PLT \
>> + | ((type) == R_MICROBLAZE_COPY) * ELF_RTYPE_CLASS_COPY)
>> +
>> int
>> elf_machine_type_class (int type, int machine)
>> {
>> @@ -243,6 +252,8 @@ elf_machine_type_class (int type, int machine)
>> return sparc64_elf_machine_type_class(type);
>> case EM_ALTERA_NIOS2:
>> return nios2_elf_machine_type_class(type);
>> + case EM_MICROBLAZE:
>> + return microblaze_elf_machine_type_class(type);
>>
>> default:
>> printf ("Unknown architecture!\n");
>> @@ -284,6 +295,7 @@ machine_no_rela (int machine)
>> case EM_SPARC32PLUS:
>> case EM_SPARCV9:
>> case EM_ALTERA_NIOS2:
>> + case EM_MICROBLAZE:
>> return 0;
>> default:
>> return 1;
>>
>
More information about the yocto
mailing list