From patchwork Wed Sep 16 15:55:24 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 8728 Received: (qmail 125478 invoked by alias); 16 Sep 2015 15:55:33 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 125363 invoked by uid 89); 16 Sep 2015 15:55:32 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Date: Wed, 16 Sep 2015 15:55:24 +0000 From: Joseph Myers To: CC: Subject: Handle ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA for MIPS Message-ID: User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 This patch handles ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA for MIPS in a way similar to other architectures. I've *not* committed this patch since, while it seems the logical change for this purpose, it doesn't actually fix the elf/tst-protected1[ab] failures; probably a binutils fix is needed as well. Perhaps someone familiar with MIPS binutils would like to look at that? 2015-09-16 Joseph Myers [BZ #17711] * sysdeps/mips/dl-machine.h (elf_machine_type_class): Handle ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA. * sysdeps/mips/dl-sysdep.h: New file. diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index 52cd742..832aa01 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -58,7 +58,8 @@ #define ELF_MACHINE_JMP_SLOT R_MIPS_JUMP_SLOT #define elf_machine_type_class(type) \ ((((type) == ELF_MACHINE_JMP_SLOT) * ELF_RTYPE_CLASS_PLT) \ - | (((type) == R_MIPS_COPY) * ELF_RTYPE_CLASS_COPY)) + | (((type) == R_MIPS_COPY) * ELF_RTYPE_CLASS_COPY) \ + | (((type) == R_MIPS_GLOB_DAT) * ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA)) #define ELF_MACHINE_PLT_REL 1 #define ELF_MACHINE_NO_REL 0 diff --git a/sysdeps/mips/dl-sysdep.h b/sysdeps/mips/dl-sysdep.h new file mode 100644 index 0000000..d94889d --- /dev/null +++ b/sysdeps/mips/dl-sysdep.h @@ -0,0 +1,21 @@ +/* System-specific settings for dynamic linker code. MIPS version. + Copyright (C) 2015 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library. If not, see + . */ + +#include_next + +#define DL_EXTERN_PROTECTED_DATA