From patchwork Fri Mar 27 09:51:27 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 132358 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id 61C0A4B9DB6A for ; Fri, 27 Mar 2026 09:52:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 61C0A4B9DB6A Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=suse.com header.i=@suse.com header.a=rsa-sha256 header.s=google header.b=YwGB1v7E X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by sourceware.org (Postfix) with ESMTPS id B42994BA2E1E for ; Fri, 27 Mar 2026 09:51:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B42994BA2E1E Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org B42994BA2E1E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::32e ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1774605091; cv=none; b=B6n32HwoiTcgH7eGu6CxegK5w4T6NOA2G6L9d5N8o9G/mYggYaRHa0NJIoOOnDj7fOZ6LrAQfse8qz6XqyIiF4INTSKyHuBUq5/RV9Axe2otX80NXxOHhU0/DgvouaDD2+7BKExs2/e6USuizA2L4khgpCe/fPvesyQ6/k5Hbm8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1774605091; c=relaxed/simple; bh=JNxhUVjGuKsCNvvgoBuQZKqSKv2dwU1Wb+Z789zFWe0=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:From:To; b=mw92oTIcwjJnfujT0eryLUh4AV8j2HXH6v/6J/0QJTEZ1vw5IgJtGZhEx6MppA9PefQHIRy3q2+2KtuPpdsiQIGR+CcwplqUInVb3ijgMkfRq1g9p9fNSRTPoAeX0IsgGrL332V1j3Nj6kBOA3eAdStUjK2giTROrI07/RRW2K4= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B42994BA2E1E Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-486fb14227cso23518445e9.3 for ; Fri, 27 Mar 2026 02:51:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1774605090; x=1775209890; darn=sourceware.org; h=content-transfer-encoding:in-reply-to:autocrypt:cc:content-language :references:to:from:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=HmpVPcrxfgVlXb/dhU+1kciN8/zU1XVdAjLQ4Yw7JDQ=; b=YwGB1v7EWX/jV2gksv9LrkMt1a3mRRVmengviz5Gox5WRS3QVkodOLzIayljre36X7 QLxuvURituLqtBo2yk84eS0f/chOiOaZ0usW9cK74WbLUWxRuBqAYaxk4op/OVRPSb68 Y8IkgYYBmO4uxK1CW1GD2kapLDkbkD9dsgYA/Lt3bh108gSeEiGfaf/PHhV+qPUVzdKo ZYCO8jpNy9TBFgFVqEiVA/bTPmg1i5Rrj9CU2uZxaMfZFfzaoOkubfgiPrHlqC507TeE kHS60LPrE1h5RlWJ19AuzIOSsTATI8+lgiBIB1QzA7I/TXhCsamEjvdHJXvj0S7fffUC K6gQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774605090; x=1775209890; h=content-transfer-encoding:in-reply-to:autocrypt:cc:content-language :references:to:from:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=HmpVPcrxfgVlXb/dhU+1kciN8/zU1XVdAjLQ4Yw7JDQ=; b=Q6jEedyLmPiJ1j3Uecca9cJCO+d12XYDYQaoUJseUf0I+5Sne5in5/UOoEWc4CDQJg TziJmn0ghEKGEGcu2fuxdeiF4FCmUv8wqgUZHLokELvX6esc+MtYp8Pdk7BxnCzEeiyx QXhqnbhEZz3s3tSlZZcxVgd3MDq35Zz3N1EOzjulGaiy9ZndnSdrfiviAnEU6yULvJkO 430StMY7dzqin9sYsstX/IvlwU34N/90NHcY7vm8mDW5F3+z0bR7qfpvXU7f9lOLEYok Iu2uQ2VRHEUIcL9UGNA6W18nL6XER06/BAacZEKsGh7+leHI0tK3btsUT9dOoIDu8KuD cqwg== X-Gm-Message-State: AOJu0Yx6t/hVjD5f5ioYHgBjftUWzKmcN3qck9KlV6I3yY39RYVW0xQo WlXFMcDYLsQ/iP/8Eev/u20uZYAXmm57CcFmS/hjfS+fqhOZEzqYrQisP1F5ZvPZZGX/swnxIQc /keq9uA== X-Gm-Gg: ATEYQzzHPLTHWYzIO/YH8gffOvbYwsPCCIMyX1omiyKJtZnwBJqDIfVJQusoXmj8ddZ cDiBwLrsbA7vnouqq2NJwSVc92pEepnzcFJ5/1IJcqSdunttwkcM7mtKjKlFyN1lSeSnwX3sudx 8j1qt3X65WY5Spjl6PgMxuniauVr0GjKxhb+cFvF+xkr4uqxeyGt44koM56xFUxkBCJ3PWyNUiZ cLMF1akVmGpFw0lK4UsUS6NSt1LyL7OYCL0f9Ne6p0OsQY8TyTS0XhORw+m0P/42VafF+IBeG9b N+kc8NRy0f3yfY1RIbsCBx8LfkkAFkSG8kf49RQXbJFUEFPIRC5eXQIiUCksU8lYfO9QiQchTnj I8d9GI6tgdpU4+9qmVS9v5su0+DPakR1uDf7Zpu8M9k9CvtxAUlZx0VJKKPr8KHFZdPE+dx23nr 6mZHp1Zw0CJ99v/l9Ea5hGHBom8ieDIk+U22ly/RBQH5K6M2nMAZLZLoFunvXOeGFmeTjJlkEnX 7+HQ2QckmLaKM0= X-Received: by 2002:a05:600c:a108:b0:485:4388:348b with SMTP id 5b1f17b1804b1-48727c81d77mr25079535e9.0.1774605089399; Fri, 27 Mar 2026 02:51:29 -0700 (PDT) Received: from [10.156.60.236] (ip-037-024-206-209.um08.pools.vodafone-ip.de. [37.24.206.209]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48722be47a4sm126314715e9.0.2026.03.27.02.51.28 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 27 Mar 2026 02:51:29 -0700 (PDT) Message-ID: <7b4fee08-4366-4a33-8765-109508f21859@suse.com> Date: Fri, 27 Mar 2026 10:51:27 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: [PATCH v2 1/6] bfd/ELF: fold BFD_RELOC__GOTOFF* From: Jan Beulich To: Binutils References: <2751d8ad-591b-4226-aeaa-a873270bce29@suse.com> Content-Language: en-US Cc: Claudiu Zissulescu , Nick Clifton , "ramana.radhakrishnan@arm.com" , Richard Earnshaw , Jie Zhang , Alexandre Oliva , "H.J. Lu" , Jon Beniston , Doug Evans , Andreas Krebbel Autocrypt: addr=jbeulich@suse.com; keydata= xsDiBFk3nEQRBADAEaSw6zC/EJkiwGPXbWtPxl2xCdSoeepS07jW8UgcHNurfHvUzogEq5xk hu507c3BarVjyWCJOylMNR98Yd8VqD9UfmX0Hb8/BrA+Hl6/DB/eqGptrf4BSRwcZQM32aZK 7Pj2XbGWIUrZrd70x1eAP9QE3P79Y2oLrsCgbZJfEwCgvz9JjGmQqQkRiTVzlZVCJYcyGGsD /0tbFCzD2h20ahe8rC1gbb3K3qk+LpBtvjBu1RY9drYk0NymiGbJWZgab6t1jM7sk2vuf0Py O9Hf9XBmK0uE9IgMaiCpc32XV9oASz6UJebwkX+zF2jG5I1BfnO9g7KlotcA/v5ClMjgo6Gl MDY4HxoSRu3i1cqqSDtVlt+AOVBJBACrZcnHAUSuCXBPy0jOlBhxPqRWv6ND4c9PH1xjQ3NP nxJuMBS8rnNg22uyfAgmBKNLpLgAGVRMZGaGoJObGf72s6TeIqKJo/LtggAS9qAUiuKVnygo 3wjfkS9A3DRO+SpU7JqWdsveeIQyeyEJ/8PTowmSQLakF+3fote9ybzd880fSmFuIEJldWxp Y2ggPGpiZXVsaWNoQHN1c2UuY29tPsJgBBMRAgAgBQJZN5xEAhsDBgsJCAcDAgQVAggDBBYC AwECHgECF4AACgkQoDSui/t3IH4J+wCfQ5jHdEjCRHj23O/5ttg9r9OIruwAn3103WUITZee e7Sbg12UgcQ5lv7SzsFNBFk3nEQQCACCuTjCjFOUdi5Nm244F+78kLghRcin/awv+IrTcIWF hUpSs1Y91iQQ7KItirz5uwCPlwejSJDQJLIS+QtJHaXDXeV6NI0Uef1hP20+y8qydDiVkv6l IreXjTb7DvksRgJNvCkWtYnlS3mYvQ9NzS9PhyALWbXnH6sIJd2O9lKS1Mrfq+y0IXCP10eS FFGg+Av3IQeFatkJAyju0PPthyTqxSI4lZYuJVPknzgaeuJv/2NccrPvmeDg6Coe7ZIeQ8Yj t0ARxu2xytAkkLCel1Lz1WLmwLstV30g80nkgZf/wr+/BXJW/oIvRlonUkxv+IbBM3dX2OV8 AmRv1ySWPTP7AAMFB/9PQK/VtlNUJvg8GXj9ootzrteGfVZVVT4XBJkfwBcpC/XcPzldjv+3 HYudvpdNK3lLujXeA5fLOH+Z/G9WBc5pFVSMocI71I8bT8lIAzreg0WvkWg5V2WZsUMlnDL9 mpwIGFhlbM3gfDMs7MPMu8YQRFVdUvtSpaAs8OFfGQ0ia3LGZcjA6Ik2+xcqscEJzNH+qh8V m5jjp28yZgaqTaRbg3M/+MTbMpicpZuqF4rnB0AQD12/3BNWDR6bmh+EkYSMcEIpQmBM51qM EKYTQGybRCjpnKHGOxG0rfFY1085mBDZCH5Kx0cl0HVJuQKC+dV2ZY5AqjcKwAxpE75MLFkr wkkEGBECAAkFAlk3nEQCGwwACgkQoDSui/t3IH7nnwCfcJWUDUFKdCsBH/E5d+0ZnMQi+G0A nAuWpQkjM1ASeQwSHEeAWPgskBQL In-Reply-To: <2751d8ad-591b-4226-aeaa-a873270bce29@suse.com> X-Spam-Status: No, score=-3017.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE, SPF_NONE, TXREP, UPPERCASE_50_75, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: binutils-bounces~patchwork=sourceware.org@sourceware.org For many of the cases there's no need to have separate relocs per arch; just like for other more or less generic ones a single one (per purpose; a 64-bit generic one is being introduced) will do. Arm64, C-Sky, and KVX - sadly - continue to be exceptions. --- a/bfd/bfd-in2.h +++ b/bfd/bfd-in2.h @@ -3306,6 +3306,7 @@ enum bfd_reloc_code_real BFD_RELOC_32_GOT_PCREL, BFD_RELOC_16_GOT_PCREL, BFD_RELOC_8_GOT_PCREL, + BFD_RELOC_64_GOTOFF, BFD_RELOC_32_GOTOFF, BFD_RELOC_16_GOTOFF, BFD_RELOC_LO16_GOTOFF, @@ -3760,8 +3761,6 @@ enum bfd_reloc_code_real BFD_RELOC_FRV_FUNCDESC_GOTOFFHI, BFD_RELOC_FRV_FUNCDESC_GOTOFFLO, BFD_RELOC_FRV_GOTOFF12, - BFD_RELOC_FRV_GOTOFFHI, - BFD_RELOC_FRV_GOTOFFLO, BFD_RELOC_FRV_GETTLSOFF, BFD_RELOC_FRV_TLSDESC_VALUE, BFD_RELOC_FRV_GOTTLSDESC12, @@ -3817,7 +3816,6 @@ enum bfd_reloc_code_real /* i386/elf relocations. */ BFD_RELOC_386_GOT32, BFD_RELOC_386_PLT32, - BFD_RELOC_386_GOTOFF, BFD_RELOC_386_GOTPC, BFD_RELOC_386_TLS_TPOFF, BFD_RELOC_386_TLS_IE, @@ -3848,7 +3846,6 @@ enum bfd_reloc_code_real BFD_RELOC_X86_64_DTPOFF32, BFD_RELOC_X86_64_GOTTPOFF, BFD_RELOC_X86_64_TPOFF32, - BFD_RELOC_X86_64_GOTOFF64, BFD_RELOC_X86_64_GOTPC32, BFD_RELOC_X86_64_GOT64, BFD_RELOC_X86_64_GOTPCREL64, @@ -4165,7 +4162,6 @@ enum bfd_reloc_code_real /* Relocations for setting up GOTs and PLTs for shared libraries. */ BFD_RELOC_ARM_GOT32, - BFD_RELOC_ARM_GOTOFF, BFD_RELOC_ARM_GOTPC, BFD_RELOC_ARM_GOT_PREL, @@ -4352,7 +4348,6 @@ enum bfd_reloc_code_real BFD_RELOC_ARC_32_PCREL, BFD_RELOC_ARC_GOT32, BFD_RELOC_ARC_GOTPC32, - BFD_RELOC_ARC_GOTOFF, BFD_RELOC_ARC_GOTPC, BFD_RELOC_ARC_S21W_PCREL_PLT, BFD_RELOC_ARC_S25H_PCREL_PLT, @@ -4417,8 +4412,6 @@ enum bfd_reloc_code_real BFD_RELOC_BFIN_FUNCDESC_GOTOFFHI, BFD_RELOC_BFIN_FUNCDESC_GOTOFFLO, BFD_RELOC_BFIN_GOTOFF17M4, - BFD_RELOC_BFIN_GOTOFFHI, - BFD_RELOC_BFIN_GOTOFFLO, /* ADI Blackfin GOT relocation. */ BFD_RELOC_BFIN_GOT, @@ -4591,9 +4584,6 @@ enum bfd_reloc_code_real BFD_RELOC_M32R_GOT24, BFD_RELOC_M32R_26_PLTREL, BFD_RELOC_M32R_GOTOFF, - BFD_RELOC_M32R_GOTOFF_HI_ULO, - BFD_RELOC_M32R_GOTOFF_HI_SLO, - BFD_RELOC_M32R_GOTOFF_LO, BFD_RELOC_M32R_GOTPC24, BFD_RELOC_M32R_GOT16_HI_ULO, BFD_RELOC_M32R_GOT16_HI_SLO, @@ -4919,8 +4909,6 @@ enum bfd_reloc_code_real BFD_RELOC_V850_32_GOT, BFD_RELOC_V850_22_PLT_PCREL, BFD_RELOC_V850_32_PLT_PCREL, - BFD_RELOC_V850_16_GOTOFF, - BFD_RELOC_V850_32_GOTOFF, /* Start code. */ BFD_RELOC_V850_CODE, @@ -5054,8 +5042,6 @@ enum bfd_reloc_code_real BFD_RELOC_METAG_LOOG, BFD_RELOC_METAG_REL8, BFD_RELOC_METAG_REL16, - BFD_RELOC_METAG_HI16_GOTOFF, - BFD_RELOC_METAG_LO16_GOTOFF, BFD_RELOC_METAG_GETSET_GOTOFF, BFD_RELOC_METAG_GETSET_GOT, BFD_RELOC_METAG_HI16_GOTPC, @@ -5063,7 +5049,6 @@ enum bfd_reloc_code_real BFD_RELOC_METAG_HI16_PLT, BFD_RELOC_METAG_LO16_PLT, BFD_RELOC_METAG_RELBRANCH_PLT, - BFD_RELOC_METAG_GOTOFF, BFD_RELOC_METAG_PLT, BFD_RELOC_METAG_TLS_GD, BFD_RELOC_METAG_TLS_LDM, @@ -5427,9 +5412,6 @@ enum bfd_reloc_code_real /* 32 bit rel. offset to GOT entry. */ BFD_RELOC_390_GOTENT, - /* 64 bit offset to GOT. */ - BFD_RELOC_390_GOTOFF64, - /* 12-bit offset to symbol-entry within GOT, with PLT handling. */ BFD_RELOC_390_GOTPLT12, @@ -6152,8 +6134,6 @@ enum bfd_reloc_code_real BFD_RELOC_LM32_CALL, BFD_RELOC_LM32_BRANCH, BFD_RELOC_LM32_16_GOT, - BFD_RELOC_LM32_GOTOFF_HI16, - BFD_RELOC_LM32_GOTOFF_LO16, /* Difference between two section addreses. Must be followed by a BFD_RELOC_MACH_O_PAIR. */ --- a/bfd/elf32-arc.c +++ b/bfd/elf32-arc.c @@ -385,6 +385,7 @@ arc_elf_link_hash_table_create (bfd *abf #define BFD_RELOC_ARC_32 BFD_RELOC_32 #define BFD_RELOC_ARC_PC32 BFD_RELOC_32_PCREL #define BFD_RELOC_ARC_PLT32 BFD_RELOC_32_PLT_PCREL +#define BFD_RELOC_ARC_GOTOFF BFD_RELOC_32_GOTOFF #define BFD_RELOC_ARC_COPY BFD_RELOC_COPY #define BFD_RELOC_ARC_GLOB_DAT BFD_RELOC_GLOB_DAT #define BFD_RELOC_ARC_JMP_SLOT BFD_RELOC_JMP_SLOT --- a/bfd/elf32-arm.c +++ b/bfd/elf32-arm.c @@ -2019,7 +2019,7 @@ static const struct elf32_arm_reloc_map {BFD_RELOC_GLOB_DAT, R_ARM_GLOB_DAT}, {BFD_RELOC_JMP_SLOT, R_ARM_JUMP_SLOT}, {BFD_RELOC_RELATIVE, R_ARM_RELATIVE}, - {BFD_RELOC_ARM_GOTOFF, R_ARM_GOTOFF32}, + {BFD_RELOC_32_GOTOFF, R_ARM_GOTOFF32}, {BFD_RELOC_ARM_GOTPC, R_ARM_GOTPC}, {BFD_RELOC_ARM_GOT_PREL, R_ARM_GOT_PREL}, {BFD_RELOC_ARM_GOT32, R_ARM_GOT32}, --- a/bfd/elf32-bfin.c +++ b/bfd/elf32-bfin.c @@ -1034,8 +1034,8 @@ static const struct bfin_reloc_map bfin_ { BFD_RELOC_BFIN_FUNCDESC_GOTOFFHI, R_BFIN_FUNCDESC_GOTOFFHI }, { BFD_RELOC_BFIN_FUNCDESC_GOTOFFLO, R_BFIN_FUNCDESC_GOTOFFLO }, { BFD_RELOC_BFIN_GOTOFF17M4, R_BFIN_GOTOFF17M4 }, - { BFD_RELOC_BFIN_GOTOFFHI, R_BFIN_GOTOFFHI }, - { BFD_RELOC_BFIN_GOTOFFLO, R_BFIN_GOTOFFLO }, + { BFD_RELOC_HI16_GOTOFF, R_BFIN_GOTOFFHI }, + { BFD_RELOC_LO16_GOTOFF, R_BFIN_GOTOFFLO }, { BFD_RELOC_VTABLE_INHERIT, R_BFIN_GNU_VTINHERIT }, { BFD_RELOC_VTABLE_ENTRY, R_BFIN_GNU_VTENTRY }, --- a/bfd/elf32-frv.c +++ b/bfd/elf32-frv.c @@ -2441,10 +2441,10 @@ frv_reloc_type_lookup (bfd *abfd ATTRIBU case BFD_RELOC_FRV_GOTOFF12: return &elf32_frv_howto_table[ (int) R_FRV_GOTOFF12]; - case BFD_RELOC_FRV_GOTOFFHI: + case BFD_RELOC_HI16_GOTOFF: return &elf32_frv_howto_table[ (int) R_FRV_GOTOFFHI]; - case BFD_RELOC_FRV_GOTOFFLO: + case BFD_RELOC_LO16_GOTOFF: return &elf32_frv_howto_table[ (int) R_FRV_GOTOFFLO]; case BFD_RELOC_FRV_GETTLSOFF: --- a/bfd/elf32-i386.c +++ b/bfd/elf32-i386.c @@ -233,8 +233,8 @@ elf_i386_reloc_type_lookup (bfd *abfd, TRACE ("BFD_RELOC_RELATIVE"); return &elf_howto_table[R_386_RELATIVE]; - case BFD_RELOC_386_GOTOFF: - TRACE ("BFD_RELOC_386_GOTOFF"); + case BFD_RELOC_32_GOTOFF: + TRACE ("BFD_RELOC_32_GOTOFF"); return &elf_howto_table[R_386_GOTOFF]; case BFD_RELOC_386_GOTPC: --- a/bfd/elf32-lm32.c +++ b/bfd/elf32-lm32.c @@ -442,8 +442,8 @@ static const struct lm32_reloc_map lm32_ { BFD_RELOC_VTABLE_INHERIT, R_LM32_GNU_VTINHERIT }, { BFD_RELOC_VTABLE_ENTRY, R_LM32_GNU_VTENTRY }, { BFD_RELOC_LM32_16_GOT, R_LM32_16_GOT }, - { BFD_RELOC_LM32_GOTOFF_HI16, R_LM32_GOTOFF_HI16 }, - { BFD_RELOC_LM32_GOTOFF_LO16, R_LM32_GOTOFF_LO16 }, + { BFD_RELOC_HI16_GOTOFF, R_LM32_GOTOFF_HI16 }, + { BFD_RELOC_LO16_GOTOFF, R_LM32_GOTOFF_LO16 }, { BFD_RELOC_COPY, R_LM32_COPY }, { BFD_RELOC_GLOB_DAT, R_LM32_GLOB_DAT }, { BFD_RELOC_JMP_SLOT, R_LM32_JMP_SLOT }, --- a/bfd/elf32-m32r.c +++ b/bfd/elf32-m32r.c @@ -1223,9 +1223,9 @@ static const struct m32r_reloc_map m32r_ { BFD_RELOC_M32R_GOTPC_HI_ULO, R_M32R_GOTPC_HI_ULO }, { BFD_RELOC_M32R_GOTPC_HI_SLO, R_M32R_GOTPC_HI_SLO }, { BFD_RELOC_M32R_GOTPC_LO, R_M32R_GOTPC_LO }, - { BFD_RELOC_M32R_GOTOFF_HI_ULO, R_M32R_GOTOFF_HI_ULO }, - { BFD_RELOC_M32R_GOTOFF_HI_SLO, R_M32R_GOTOFF_HI_SLO }, - { BFD_RELOC_M32R_GOTOFF_LO, R_M32R_GOTOFF_LO }, + { BFD_RELOC_HI16_GOTOFF, R_M32R_GOTOFF_HI_ULO }, + { BFD_RELOC_HI16_S_GOTOFF, R_M32R_GOTOFF_HI_SLO }, + { BFD_RELOC_LO16_GOTOFF, R_M32R_GOTOFF_LO }, }; #endif --- a/bfd/elf32-metag.c +++ b/bfd/elf32-metag.c @@ -709,8 +709,8 @@ static const struct metag_reloc_map meta { BFD_RELOC_VTABLE_ENTRY, R_METAG_GNU_VTENTRY }, { BFD_RELOC_METAG_REL8, R_METAG_REL8 }, { BFD_RELOC_METAG_REL16, R_METAG_REL16 }, - { BFD_RELOC_METAG_HI16_GOTOFF, R_METAG_HI16_GOTOFF }, - { BFD_RELOC_METAG_LO16_GOTOFF, R_METAG_LO16_GOTOFF }, + { BFD_RELOC_HI16_GOTOFF, R_METAG_HI16_GOTOFF }, + { BFD_RELOC_LO16_GOTOFF, R_METAG_LO16_GOTOFF }, { BFD_RELOC_METAG_GETSET_GOTOFF, R_METAG_GETSET_GOTOFF }, { BFD_RELOC_METAG_GETSET_GOT, R_METAG_GETSET_GOT }, { BFD_RELOC_METAG_HI16_GOTPC, R_METAG_HI16_GOTPC }, @@ -718,7 +718,7 @@ static const struct metag_reloc_map meta { BFD_RELOC_METAG_HI16_PLT, R_METAG_HI16_PLT }, { BFD_RELOC_METAG_LO16_PLT, R_METAG_LO16_PLT }, { BFD_RELOC_METAG_RELBRANCH_PLT, R_METAG_RELBRANCH_PLT }, - { BFD_RELOC_METAG_GOTOFF, R_METAG_GOTOFF }, + { BFD_RELOC_32_GOTOFF, R_METAG_GOTOFF }, { BFD_RELOC_METAG_PLT, R_METAG_PLT }, { BFD_RELOC_COPY, R_METAG_COPY }, { BFD_RELOC_JMP_SLOT, R_METAG_JMP_SLOT }, --- a/bfd/elf32-v850.c +++ b/bfd/elf32-v850.c @@ -1740,8 +1740,8 @@ static const struct v850_elf_reloc_map v { BFD_RELOC_GLOB_DAT, R_V850_GLOB_DAT }, { BFD_RELOC_JMP_SLOT, R_V850_JMP_SLOT }, { BFD_RELOC_RELATIVE, R_V850_RELATIVE }, - { BFD_RELOC_V850_16_GOTOFF, R_V850_16_GOTOFF }, - { BFD_RELOC_V850_32_GOTOFF, R_V850_32_GOTOFF }, + { BFD_RELOC_16_GOTOFF, R_V850_16_GOTOFF }, + { BFD_RELOC_32_GOTOFF, R_V850_32_GOTOFF }, { BFD_RELOC_V850_CODE, R_V850_CODE }, { BFD_RELOC_V850_DATA, R_V850_DATA }, }; --- a/bfd/elf64-s390.c +++ b/bfd/elf64-s390.c @@ -263,7 +263,7 @@ elf_s390_reloc_type_lookup (bfd *abfd, return &elf_howto_table[(int) R_390_GOTENT]; case BFD_RELOC_16_GOTOFF: return &elf_howto_table[(int) R_390_GOTOFF16]; - case BFD_RELOC_390_GOTOFF64: + case BFD_RELOC_64_GOTOFF: return &elf_howto_table[(int) R_390_GOTOFF64]; case BFD_RELOC_390_GOTPLT12: return &elf_howto_table[(int) R_390_GOTPLT12]; --- a/bfd/elf64-x86-64.c +++ b/bfd/elf64-x86-64.c @@ -255,7 +255,7 @@ static const struct elf_reloc_map x86_64 { BFD_RELOC_X86_64_GOTTPOFF, R_X86_64_GOTTPOFF, }, { BFD_RELOC_X86_64_TPOFF32, R_X86_64_TPOFF32, }, { BFD_RELOC_64_PCREL, R_X86_64_PC64, }, - { BFD_RELOC_X86_64_GOTOFF64, R_X86_64_GOTOFF64, }, + { BFD_RELOC_64_GOTOFF, R_X86_64_GOTOFF64, }, { BFD_RELOC_X86_64_GOTPC32, R_X86_64_GOTPC32, }, { BFD_RELOC_X86_64_GOT64, R_X86_64_GOT64, }, { BFD_RELOC_X86_64_GOTPCREL64,R_X86_64_GOTPCREL64, }, --- a/bfd/libbfd.h +++ b/bfd/libbfd.h @@ -1081,6 +1081,7 @@ static const char *const bfd_reloc_code_ "BFD_RELOC_32_GOT_PCREL", "BFD_RELOC_16_GOT_PCREL", "BFD_RELOC_8_GOT_PCREL", + "BFD_RELOC_64_GOTOFF", "BFD_RELOC_32_GOTOFF", "BFD_RELOC_16_GOTOFF", "BFD_RELOC_LO16_GOTOFF", @@ -1373,8 +1374,6 @@ static const char *const bfd_reloc_code_ "BFD_RELOC_FRV_FUNCDESC_GOTOFFHI", "BFD_RELOC_FRV_FUNCDESC_GOTOFFLO", "BFD_RELOC_FRV_GOTOFF12", - "BFD_RELOC_FRV_GOTOFFHI", - "BFD_RELOC_FRV_GOTOFFLO", "BFD_RELOC_FRV_GETTLSOFF", "BFD_RELOC_FRV_TLSDESC_VALUE", "BFD_RELOC_FRV_GOTTLSDESC12", @@ -1408,7 +1407,6 @@ static const char *const bfd_reloc_code_ "BFD_RELOC_MN10300_TLS_TPOFF", "BFD_RELOC_386_GOT32", "BFD_RELOC_386_PLT32", - "BFD_RELOC_386_GOTOFF", "BFD_RELOC_386_GOTPC", "BFD_RELOC_386_TLS_TPOFF", "BFD_RELOC_386_TLS_IE", @@ -1437,7 +1435,6 @@ static const char *const bfd_reloc_code_ "BFD_RELOC_X86_64_DTPOFF32", "BFD_RELOC_X86_64_GOTTPOFF", "BFD_RELOC_X86_64_TPOFF32", - "BFD_RELOC_X86_64_GOTOFF64", "BFD_RELOC_X86_64_GOTPC32", "BFD_RELOC_X86_64_GOT64", "BFD_RELOC_X86_64_GOTPCREL64", @@ -1683,7 +1680,6 @@ static const char *const bfd_reloc_code_ "BFD_RELOC_ARM_TLS_LDM32_FDPIC", "BFD_RELOC_ARM_TLS_IE32_FDPIC", "BFD_RELOC_ARM_GOT32", - "BFD_RELOC_ARM_GOTOFF", "BFD_RELOC_ARM_GOTPC", "BFD_RELOC_ARM_GOT_PREL", "BFD_RELOC_ARM_TLS_GD32", @@ -1855,7 +1851,6 @@ static const char *const bfd_reloc_code_ "BFD_RELOC_ARC_32_PCREL", "BFD_RELOC_ARC_GOT32", "BFD_RELOC_ARC_GOTPC32", - "BFD_RELOC_ARC_GOTOFF", "BFD_RELOC_ARC_GOTPC", "BFD_RELOC_ARC_S21W_PCREL_PLT", "BFD_RELOC_ARC_S25H_PCREL_PLT", @@ -1896,8 +1891,6 @@ static const char *const bfd_reloc_code_ "BFD_RELOC_BFIN_FUNCDESC_GOTOFFHI", "BFD_RELOC_BFIN_FUNCDESC_GOTOFFLO", "BFD_RELOC_BFIN_GOTOFF17M4", - "BFD_RELOC_BFIN_GOTOFFHI", - "BFD_RELOC_BFIN_GOTOFFLO", "BFD_RELOC_BFIN_GOT", "BFD_RELOC_BFIN_PLTPC", "BFD_ARELOC_BFIN_PUSH", @@ -1953,9 +1946,6 @@ static const char *const bfd_reloc_code_ "BFD_RELOC_M32R_GOT24", "BFD_RELOC_M32R_26_PLTREL", "BFD_RELOC_M32R_GOTOFF", - "BFD_RELOC_M32R_GOTOFF_HI_ULO", - "BFD_RELOC_M32R_GOTOFF_HI_SLO", - "BFD_RELOC_M32R_GOTOFF_LO", "BFD_RELOC_M32R_GOTPC24", "BFD_RELOC_M32R_GOT16_HI_ULO", "BFD_RELOC_M32R_GOT16_HI_SLO", @@ -2124,8 +2114,6 @@ static const char *const bfd_reloc_code_ "BFD_RELOC_V850_32_GOT", "BFD_RELOC_V850_22_PLT_PCREL", "BFD_RELOC_V850_32_PLT_PCREL", - "BFD_RELOC_V850_16_GOTOFF", - "BFD_RELOC_V850_32_GOTOFF", "BFD_RELOC_V850_CODE", "BFD_RELOC_V850_DATA", "BFD_RELOC_TIC30_LDP", @@ -2202,8 +2190,6 @@ static const char *const bfd_reloc_code_ "BFD_RELOC_METAG_LOOG", "BFD_RELOC_METAG_REL8", "BFD_RELOC_METAG_REL16", - "BFD_RELOC_METAG_HI16_GOTOFF", - "BFD_RELOC_METAG_LO16_GOTOFF", "BFD_RELOC_METAG_GETSET_GOTOFF", "BFD_RELOC_METAG_GETSET_GOT", "BFD_RELOC_METAG_HI16_GOTPC", @@ -2211,7 +2197,6 @@ static const char *const bfd_reloc_code_ "BFD_RELOC_METAG_HI16_PLT", "BFD_RELOC_METAG_LO16_PLT", "BFD_RELOC_METAG_RELBRANCH_PLT", - "BFD_RELOC_METAG_GOTOFF", "BFD_RELOC_METAG_PLT", "BFD_RELOC_METAG_TLS_GD", "BFD_RELOC_METAG_TLS_LDM", @@ -2409,7 +2394,6 @@ static const char *const bfd_reloc_code_ "BFD_RELOC_390_GOTPCDBL", "BFD_RELOC_390_GOT64", "BFD_RELOC_390_GOTENT", - "BFD_RELOC_390_GOTOFF64", "BFD_RELOC_390_GOTPLT12", "BFD_RELOC_390_GOTPLT16", "BFD_RELOC_390_GOTPLT32", @@ -2814,8 +2798,6 @@ static const char *const bfd_reloc_code_ "BFD_RELOC_LM32_CALL", "BFD_RELOC_LM32_BRANCH", "BFD_RELOC_LM32_16_GOT", - "BFD_RELOC_LM32_GOTOFF_HI16", - "BFD_RELOC_LM32_GOTOFF_LO16", "BFD_RELOC_MACH_O_SECTDIFF", "BFD_RELOC_MACH_O_LOCAL_SECTDIFF", "BFD_RELOC_MACH_O_PAIR", --- a/bfd/reloc.c +++ b/bfd/reloc.c @@ -1435,6 +1435,8 @@ ENUMX ENUMX BFD_RELOC_8_GOT_PCREL ENUMX + BFD_RELOC_64_GOTOFF +ENUMX BFD_RELOC_32_GOTOFF ENUMX BFD_RELOC_16_GOTOFF @@ -2228,10 +2230,6 @@ ENUMX ENUMX BFD_RELOC_FRV_GOTOFF12 ENUMX - BFD_RELOC_FRV_GOTOFFHI -ENUMX - BFD_RELOC_FRV_GOTOFFLO -ENUMX BFD_RELOC_FRV_GETTLSOFF ENUMX BFD_RELOC_FRV_TLSDESC_VALUE @@ -2322,8 +2320,6 @@ ENUM ENUMX BFD_RELOC_386_PLT32 ENUMX - BFD_RELOC_386_GOTOFF -ENUMX BFD_RELOC_386_GOTPC ENUMX BFD_RELOC_386_TLS_TPOFF @@ -2383,8 +2379,6 @@ ENUMX ENUMX BFD_RELOC_X86_64_TPOFF32 ENUMX - BFD_RELOC_X86_64_GOTOFF64 -ENUMX BFD_RELOC_X86_64_GOTPC32 ENUMX BFD_RELOC_X86_64_GOT64 @@ -2965,8 +2959,6 @@ ENUMDOC ENUM BFD_RELOC_ARM_GOT32 ENUMX - BFD_RELOC_ARM_GOTOFF -ENUMX BFD_RELOC_ARM_GOTPC ENUMX BFD_RELOC_ARM_GOT_PREL @@ -3331,8 +3323,6 @@ ENUMX ENUMX BFD_RELOC_ARC_GOTPC32 ENUMX - BFD_RELOC_ARC_GOTOFF -ENUMX BFD_RELOC_ARC_GOTPC ENUMX BFD_RELOC_ARC_S21W_PCREL_PLT @@ -3437,10 +3427,6 @@ ENUMX BFD_RELOC_BFIN_FUNCDESC_GOTOFFLO ENUMX BFD_RELOC_BFIN_GOTOFF17M4 -ENUMX - BFD_RELOC_BFIN_GOTOFFHI -ENUMX - BFD_RELOC_BFIN_GOTOFFLO ENUMDOC ADI Blackfin FD-PIC relocations. ENUM @@ -3674,12 +3660,6 @@ ENUMX ENUMX BFD_RELOC_M32R_GOTOFF ENUMX - BFD_RELOC_M32R_GOTOFF_HI_ULO -ENUMX - BFD_RELOC_M32R_GOTOFF_HI_SLO -ENUMX - BFD_RELOC_M32R_GOTOFF_LO -ENUMX BFD_RELOC_M32R_GOTPC24 ENUMX BFD_RELOC_M32R_GOT16_HI_ULO @@ -4177,10 +4157,6 @@ ENUMX BFD_RELOC_V850_22_PLT_PCREL ENUMX BFD_RELOC_V850_32_PLT_PCREL -ENUMX - BFD_RELOC_V850_16_GOTOFF -ENUMX - BFD_RELOC_V850_32_GOTOFF ENUMDOC DSO relocations. ENUM @@ -4402,10 +4378,6 @@ ENUMX ENUMX BFD_RELOC_METAG_REL16 ENUMX - BFD_RELOC_METAG_HI16_GOTOFF -ENUMX - BFD_RELOC_METAG_LO16_GOTOFF -ENUMX BFD_RELOC_METAG_GETSET_GOTOFF ENUMX BFD_RELOC_METAG_GETSET_GOT @@ -4420,8 +4392,6 @@ ENUMX ENUMX BFD_RELOC_METAG_RELBRANCH_PLT ENUMX - BFD_RELOC_METAG_GOTOFF -ENUMX BFD_RELOC_METAG_PLT ENUMX BFD_RELOC_METAG_TLS_GD @@ -4989,10 +4959,6 @@ ENUM ENUMDOC 32 bit rel. offset to GOT entry. ENUM - BFD_RELOC_390_GOTOFF64 -ENUMDOC - 64 bit offset to GOT. -ENUM BFD_RELOC_390_GOTPLT12 ENUMDOC 12-bit offset to symbol-entry within GOT, with PLT handling. @@ -6140,10 +6106,6 @@ ENUMX BFD_RELOC_LM32_BRANCH ENUMX BFD_RELOC_LM32_16_GOT -ENUMX - BFD_RELOC_LM32_GOTOFF_HI16 -ENUMX - BFD_RELOC_LM32_GOTOFF_LO16 ENUMDOC Lattice Mico32 relocations. --- a/gas/config/tc-arc.c +++ b/gas/config/tc-arc.c @@ -542,7 +542,7 @@ static const struct arc_reloc_op_tag } arc_reloc_op[] = { - DEF (gotoff, BFD_RELOC_ARC_GOTOFF, 1), + DEF (gotoff, BFD_RELOC_32_GOTOFF, 1), DEF (gotpc, BFD_RELOC_ARC_GOTPC32, 0), DEF (plt, BFD_RELOC_32_PLT_PCREL, 0), DEF (sda, DUMMY_RELOC_ARC_ENTRY, 1), @@ -3099,7 +3099,7 @@ md_apply_fix (fixS *fixP, gas_assert (!fixP->fx_subsy); /* Fall through. */ - case BFD_RELOC_ARC_GOTOFF: + case BFD_RELOC_32_GOTOFF: case BFD_RELOC_ARC_32_ME: case BFD_RELOC_32_PCREL: md_number_to_chars_midend (fixpos, value, fixP->fx_size); --- a/gas/config/tc-arm.c +++ b/gas/config/tc-arm.c @@ -23894,7 +23894,7 @@ static const struct asm_shift_name shift static struct reloc_entry reloc_names[] = { { "got", BFD_RELOC_ARM_GOT32 }, { "GOT", BFD_RELOC_ARM_GOT32 }, - { "gotoff", BFD_RELOC_ARM_GOTOFF }, { "GOTOFF", BFD_RELOC_ARM_GOTOFF }, + { "gotoff", BFD_RELOC_32_GOTOFF }, { "GOTOFF", BFD_RELOC_32_GOTOFF }, { "plt", BFD_RELOC_32_PLT_PCREL}, { "PLT", BFD_RELOC_32_PLT_PCREL}, { "target1", BFD_RELOC_ARM_TARGET1 }, { "TARGET1", BFD_RELOC_ARM_TARGET1 }, { "target2", BFD_RELOC_ARM_TARGET2 }, { "TARGET2", BFD_RELOC_ARM_TARGET2 }, @@ -28458,7 +28458,7 @@ md_apply_fix (fixS * fixP, break; case BFD_RELOC_ARM_GOT32: - case BFD_RELOC_ARM_GOTOFF: + case BFD_RELOC_32_GOTOFF: break; case BFD_RELOC_ARM_GOT_PREL: @@ -29413,7 +29413,7 @@ tc_gen_reloc (asection *section, fixS *f case BFD_RELOC_ARM_TLS_DESCSEQ: case BFD_RELOC_ARM_THM_TLS_DESCSEQ: case BFD_RELOC_ARM_GOT32: - case BFD_RELOC_ARM_GOTOFF: + case BFD_RELOC_32_GOTOFF: case BFD_RELOC_ARM_GOT_PREL: case BFD_RELOC_32_PLT_PCREL: case BFD_RELOC_ARM_TARGET1: @@ -29746,7 +29746,7 @@ arm_fix_adjustable (fixS * fixP) /* Don't allow symbols to be discarded on GOT related relocs. */ if (fixP->fx_r_type == BFD_RELOC_32_PLT_PCREL || fixP->fx_r_type == BFD_RELOC_ARM_GOT32 - || fixP->fx_r_type == BFD_RELOC_ARM_GOTOFF + || fixP->fx_r_type == BFD_RELOC_32_GOTOFF || fixP->fx_r_type == BFD_RELOC_ARM_TLS_GD32 || fixP->fx_r_type == BFD_RELOC_ARM_TLS_GD32_FDPIC || fixP->fx_r_type == BFD_RELOC_ARM_TLS_LE32 --- a/gas/config/tc-frv.c +++ b/gas/config/tc-frv.c @@ -1399,8 +1399,8 @@ frv_force_relocation (fixS *fix) case BFD_RELOC_FRV_FUNCDESC_GOTOFFHI: case BFD_RELOC_FRV_FUNCDESC_GOTOFFLO: case BFD_RELOC_FRV_GOTOFF12: - case BFD_RELOC_FRV_GOTOFFHI: - case BFD_RELOC_FRV_GOTOFFLO: + case BFD_RELOC_HI16_GOTOFF: + case BFD_RELOC_LO16_GOTOFF: case BFD_RELOC_FRV_GETTLSOFF: case BFD_RELOC_FRV_TLSDESC_VALUE: case BFD_RELOC_FRV_GOTTLSDESC12: @@ -1455,8 +1455,8 @@ md_apply_fix (fixS *fixP, valueT *valP, case BFD_RELOC_FRV_FUNCDESC_GOTOFFHI: case BFD_RELOC_FRV_FUNCDESC_GOTOFFLO: case BFD_RELOC_FRV_GOTOFF12: - case BFD_RELOC_FRV_GOTOFFHI: - case BFD_RELOC_FRV_GOTOFFLO: + case BFD_RELOC_HI16_GOTOFF: + case BFD_RELOC_LO16_GOTOFF: case BFD_RELOC_FRV_GETTLSOFF: case BFD_RELOC_FRV_TLSDESC_VALUE: case BFD_RELOC_FRV_GOTTLSDESC12: --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -1403,8 +1403,8 @@ gotrel[] = { STRING_COMMA_LEN ("GOTPLT"), { _dummy_first_bfd_reloc_code_real, BFD_RELOC_X86_64_GOTPLT64 }, OPERAND_TYPE_IMM64_DISP64, true }, - { STRING_COMMA_LEN ("GOTOFF"), { BFD_RELOC_386_GOTOFF, - BFD_RELOC_X86_64_GOTOFF64 }, + { STRING_COMMA_LEN ("GOTOFF"), { BFD_RELOC_32_GOTOFF, + BFD_RELOC_64_GOTOFF }, OPERAND_TYPE_IMM64_DISP64, true }, { STRING_COMMA_LEN ("GOTPCREL"), { _dummy_first_bfd_reloc_code_real, BFD_RELOC_X86_64_GOTPCREL }, @@ -4097,7 +4097,7 @@ tc_i386_fix_adjustable (fixS *fixP) for size relocations. */ if (fixP->fx_r_type == BFD_RELOC_SIZE32 || fixP->fx_r_type == BFD_RELOC_SIZE64 - || fixP->fx_r_type == BFD_RELOC_386_GOTOFF + || fixP->fx_r_type == BFD_RELOC_32_GOTOFF || fixP->fx_r_type == BFD_RELOC_386_GOT32 || fixP->fx_r_type == BFD_RELOC_386_GOT32X || fixP->fx_r_type == BFD_RELOC_386_TLS_GD @@ -4127,7 +4127,7 @@ tc_i386_fix_adjustable (fixS *fixP) || fixP->fx_r_type == BFD_RELOC_X86_64_CODE_6_GOTTPOFF || fixP->fx_r_type == BFD_RELOC_X86_64_TPOFF32 || fixP->fx_r_type == BFD_RELOC_X86_64_TPOFF64 - || fixP->fx_r_type == BFD_RELOC_X86_64_GOTOFF64 + || fixP->fx_r_type == BFD_RELOC_64_GOTOFF || fixP->fx_r_type == BFD_RELOC_X86_64_GOT64 || fixP->fx_r_type == BFD_RELOC_X86_64_GOTPC32_TLSDESC || fixP->fx_r_type == BFD_RELOC_X86_64_CODE_4_GOTPC32_TLSDESC @@ -15077,9 +15077,9 @@ i386_finalize_displacement (segT exp_seg /* We do this to make sure that the section symbol is in the symbol table. We will ultimately change the relocation to be relative to the beginning of the section. */ - if (i.reloc[this_operand] == BFD_RELOC_386_GOTOFF + if (i.reloc[this_operand] == BFD_RELOC_32_GOTOFF || i.reloc[this_operand] == BFD_RELOC_X86_64_GOTPCREL - || i.reloc[this_operand] == BFD_RELOC_X86_64_GOTOFF64) + || i.reloc[this_operand] == BFD_RELOC_64_GOTOFF) { if (exp->X_op != O_symbol) goto inv_disp; @@ -15092,7 +15092,7 @@ i386_finalize_displacement (segT exp_seg exp->X_op_symbol = GOT_symbol; if (i.reloc[this_operand] == BFD_RELOC_X86_64_GOTPCREL) i.reloc[this_operand] = BFD_RELOC_32_PCREL; - else if (i.reloc[this_operand] == BFD_RELOC_X86_64_GOTOFF64) + else if (i.reloc[this_operand] == BFD_RELOC_64_GOTOFF) i.reloc[this_operand] = BFD_RELOC_64; else i.reloc[this_operand] = BFD_RELOC_32; @@ -18418,9 +18418,9 @@ i386_validate_fix (fixS *fixp) else { if (!object_64bit) - fixp->fx_r_type = BFD_RELOC_386_GOTOFF; + fixp->fx_r_type = BFD_RELOC_32_GOTOFF; else - fixp->fx_r_type = BFD_RELOC_X86_64_GOTOFF64; + fixp->fx_r_type = BFD_RELOC_64_GOTOFF; } fixp->fx_subsy = 0; } @@ -18524,7 +18524,7 @@ tc_gen_reloc (asection *section ATTRIBUT case BFD_RELOC_386_PLT32: case BFD_RELOC_386_GOT32: case BFD_RELOC_386_GOT32X: - case BFD_RELOC_386_GOTOFF: + case BFD_RELOC_32_GOTOFF: case BFD_RELOC_386_GOTPC: case BFD_RELOC_386_TLS_GD: case BFD_RELOC_386_TLS_LDM: @@ -18546,7 +18546,7 @@ tc_gen_reloc (asection *section ATTRIBUT case BFD_RELOC_X86_64_CODE_6_GOTTPOFF: case BFD_RELOC_X86_64_TPOFF32: case BFD_RELOC_X86_64_TPOFF64: - case BFD_RELOC_X86_64_GOTOFF64: + case BFD_RELOC_64_GOTOFF: case BFD_RELOC_X86_64_GOTPC32: case BFD_RELOC_X86_64_GOT64: case BFD_RELOC_X86_64_GOTPCREL64: @@ -18661,7 +18661,7 @@ tc_gen_reloc (asection *section ATTRIBUT case BFD_RELOC_X86_64_DTPOFF64: case BFD_RELOC_X86_64_TPOFF64: case BFD_RELOC_64_PCREL: - case BFD_RELOC_X86_64_GOTOFF64: + case BFD_RELOC_64_GOTOFF: case BFD_RELOC_X86_64_GOT64: case BFD_RELOC_X86_64_GOTPCREL64: case BFD_RELOC_X86_64_GOTPC64: --- a/gas/config/tc-lm32.c +++ b/gas/config/tc-lm32.c @@ -318,9 +318,9 @@ md_cgen_lookup_reloc (const CGEN_INSN *i case LM32_OPERAND_GOT16: return BFD_RELOC_LM32_16_GOT; case LM32_OPERAND_GOTOFFHI16: - return BFD_RELOC_LM32_GOTOFF_HI16; + return BFD_RELOC_HI16_GOTOFF; case LM32_OPERAND_GOTOFFLO16: - return BFD_RELOC_LM32_GOTOFF_LO16; + return BFD_RELOC_LO16_GOTOFF; case LM32_OPERAND_GP16: return BFD_RELOC_GPREL16; case LM32_OPERAND_LO16: --- a/gas/config/tc-m32r.c +++ b/gas/config/tc-m32r.c @@ -1967,11 +1967,11 @@ m32r_cgen_record_fixup_exp (fragS *frag, case BFD_RELOC_M32R_GOTOFF: if (fixP->fx_cgen.opinfo == BFD_RELOC_M32R_HI16_SLO) - r_type = BFD_RELOC_M32R_GOTOFF_HI_SLO; + r_type = BFD_RELOC_HI16_S_GOTOFF; else if (fixP->fx_cgen.opinfo == BFD_RELOC_M32R_HI16_ULO) - r_type = BFD_RELOC_M32R_GOTOFF_HI_ULO; + r_type = BFD_RELOC_HI16_GOTOFF; else if (fixP->fx_cgen.opinfo == BFD_RELOC_M32R_LO16) - r_type = BFD_RELOC_M32R_GOTOFF_LO; + r_type = BFD_RELOC_LO16_GOTOFF; break; case BFD_RELOC_M32R_26_PLTREL: --- a/gas/config/tc-metag.c +++ b/gas/config/tc-metag.c @@ -679,7 +679,7 @@ parse_imm_addr (const char *line, metag_ addr->reloc_type = BFD_RELOC_METAG_TLS_IE; } else if (exp->X_op == O_PIC_reloc && - exp->X_md == BFD_RELOC_METAG_GOTOFF) + exp->X_md == BFD_RELOC_32_GOTOFF) { exp->X_op = O_symbol; addr->reloc_type = BFD_RELOC_METAG_GETSET_GOTOFF; @@ -1880,12 +1880,12 @@ parse_imm16 (const char *line, metag_ins { exp->X_op = O_symbol; - if (exp->X_md == BFD_RELOC_METAG_GOTOFF) + if (exp->X_md == BFD_RELOC_32_GOTOFF) { if (is_hi) - insn->reloc_type = BFD_RELOC_METAG_HI16_GOTOFF; + insn->reloc_type = BFD_RELOC_HI16_GOTOFF; else if (is_lo) - insn->reloc_type = BFD_RELOC_METAG_LO16_GOTOFF; + insn->reloc_type = BFD_RELOC_LO16_GOTOFF; else return NULL; } @@ -6779,8 +6779,8 @@ metag_fix_adjustable (fixS * fixP) if (S_IS_WEAK (fixP->fx_addsy)) return 0; - if (fixP->fx_r_type == BFD_RELOC_METAG_HI16_GOTOFF || - fixP->fx_r_type == BFD_RELOC_METAG_LO16_GOTOFF || + if (fixP->fx_r_type == BFD_RELOC_HI16_GOTOFF || + fixP->fx_r_type == BFD_RELOC_LO16_GOTOFF || fixP->fx_r_type == BFD_RELOC_METAG_GETSET_GOTOFF || fixP->fx_r_type == BFD_RELOC_METAG_GETSET_GOT || fixP->fx_r_type == BFD_RELOC_METAG_HI16_GOTPC || @@ -6922,7 +6922,7 @@ metag_parse_name (char const * name, exp goto no_suffix; else if ((next_end = metag_end_of_match (next + 1, "GOTOFF"))) { - reloc_type = BFD_RELOC_METAG_GOTOFF; + reloc_type = BFD_RELOC_32_GOTOFF; op_type = O_PIC_reloc; } else if ((next_end = metag_end_of_match (next + 1, "GOT"))) --- a/gas/config/tc-s390.c +++ b/gas/config/tc-s390.c @@ -1294,7 +1294,7 @@ s390_elf_cons (int nbytes /* 1=.byte, 2= BFD_RELOC_390_GOT64, /* ELF_SUFFIX_GOT */ BFD_RELOC_64_PLT_PCREL, /* ELF_SUFFIX_PLT */ BFD_RELOC_UNUSED, /* ELF_SUFFIX_GOTENT */ - BFD_RELOC_390_GOTOFF64, /* ELF_SUFFIX_GOTOFF */ + BFD_RELOC_64_GOTOFF, /* ELF_SUFFIX_GOTOFF */ BFD_RELOC_390_GOTPLT64, /* ELF_SUFFIX_GOTPLT */ BFD_RELOC_390_PLTOFF64, /* ELF_SUFFIX_PLTOFF */ BFD_RELOC_390_TLS_GD64, /* ELF_SUFFIX_TLS_GD */ @@ -2383,7 +2383,7 @@ tc_s390_fix_adjustable (fixS *fixP) /* adjust_reloc_syms doesn't know about the GOT. */ if ( fixP->fx_r_type == BFD_RELOC_16_GOTOFF || fixP->fx_r_type == BFD_RELOC_32_GOTOFF - || fixP->fx_r_type == BFD_RELOC_390_GOTOFF64 + || fixP->fx_r_type == BFD_RELOC_64_GOTOFF || fixP->fx_r_type == BFD_RELOC_390_PLTOFF16 || fixP->fx_r_type == BFD_RELOC_390_PLTOFF32 || fixP->fx_r_type == BFD_RELOC_390_PLTOFF64 @@ -2445,7 +2445,7 @@ tc_s390_force_relocation (struct fix *fi case BFD_RELOC_390_GOT20: case BFD_RELOC_32_GOT_PCREL: case BFD_RELOC_32_GOTOFF: - case BFD_RELOC_390_GOTOFF64: + case BFD_RELOC_64_GOTOFF: case BFD_RELOC_390_PLTOFF16: case BFD_RELOC_390_PLTOFF32: case BFD_RELOC_390_PLTOFF64: @@ -2750,7 +2750,7 @@ md_apply_fix (fixS *fixP, valueT *valP, md_number_to_chars (where, value, sizeof (int)); break; - case BFD_RELOC_390_GOTOFF64: + case BFD_RELOC_64_GOTOFF: if (fixP->fx_done) md_number_to_chars (where, value, 8); break; --- a/opcodes/frv-asm.c +++ b/opcodes/frv-asm.c @@ -256,7 +256,7 @@ parse_ulo16 (CGEN_CPU_DESC cd, { *strp += 10; errmsg = parse_symbolic_address (cd, strp, opindex, - BFD_RELOC_FRV_GOTOFFLO, + BFD_RELOC_LO16_GOTOFF, & result_type, & value); if (**strp != ')') return "missing ')'"; @@ -382,7 +382,7 @@ parse_uslo16 (CGEN_CPU_DESC cd, { *strp += 10; errmsg = parse_symbolic_address (cd, strp, opindex, - BFD_RELOC_FRV_GOTOFFLO, + BFD_RELOC_LO16_GOTOFF, & result_type, & value); if (**strp != ')') return "missing ')'"; @@ -515,7 +515,7 @@ parse_uhi16 (CGEN_CPU_DESC cd, { *strp += 10; errmsg = parse_symbolic_address (cd, strp, opindex, - BFD_RELOC_FRV_GOTOFFHI, + BFD_RELOC_HI16_GOTOFF, & result_type, & value); if (**strp != ')') return "missing ')'"; --- a/opcodes/lm32-asm.c +++ b/opcodes/lm32-asm.c @@ -211,7 +211,7 @@ parse_gotoff_hi16 (CGEN_CPU_DESC cd, bfd_vma value; *strp += 11; - errmsg = cgen_parse_address (cd, strp, opindex, BFD_RELOC_LM32_GOTOFF_HI16, + errmsg = cgen_parse_address (cd, strp, opindex, BFD_RELOC_HI16_GOTOFF, & result_type, & value); if (**strp != ')') return _("missing `)'"); @@ -241,7 +241,7 @@ parse_gotoff_lo16 (CGEN_CPU_DESC cd, bfd_vma value; *strp += 11; - errmsg = cgen_parse_address (cd, strp, opindex, BFD_RELOC_LM32_GOTOFF_LO16, + errmsg = cgen_parse_address (cd, strp, opindex, BFD_RELOC_LO16_GOTOFF, &result_type, &value); if (**strp != ')') return _("missing `)'");