From owner-freebsd-ppc@freebsd.org Fri Jun 7 01:05:50 2019 Return-Path: Delivered-To: freebsd-ppc@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7020415C4B3E for ; Fri, 7 Jun 2019 01:05:50 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic317-33.consmr.mail.ne1.yahoo.com (sonic317-33.consmr.mail.ne1.yahoo.com [66.163.184.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3D6078EA71 for ; Fri, 7 Jun 2019 01:05:49 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: W2lRwVYVM1lXvSjKLRl3y0fz1M3CZuapGEHQQ3cCP1EQf1PwnC7Lqdl.dkyDv9B Dr.__q1Vi4QT6JwbO04PJlajLzF5Juzoy3HA5iPZxSM_dBjuf_LbNsl7BecIuEh84uJ1Rp88vvWZ tI07Kun0miYcSUAh2xLiHBY0aqZcZ6DXlo4CUKEm4jv.U.v89qTVBrWr5A_587QiH9pLo9CFdOYe PKT6WFixLeEO2NJA9378ph2L_vmdq.cEOiGlao_LTNCh7f1pGvT3JW736MVy66ZhiJn7VW0ChRdT Ysx6yLO8dbUK.sGuFA4XxRaetRh._y3svKOsEL.z_gLtPnYj_0kxaFupOV4O3JRtp6gk12k828uj OmxTL_2Jetho2kYwLLSj_.oY97hTR25C4Hv5YZxd8v4LV1Q0NPjXOvFJSln0tR8h7Z3Y8GxWLS4p azayaLXWiW6QfR4ZC2zCxXfPxJDhfnF_KaN3xlRqPMzMarSXkBB4g5b3DZGU7HjJOapRSer384Mr ekYU8TLJrdEwgmLg.a.p2d2VfvxgKel24GnRUvcyEyUdoXDSTrhdQRBdJr38RQjADCQa6QNEyx2T .pYLHZl.gILlVopRB44q.nx6hmqSJa3ho8Oms9DLiwnYT1bUOXPwxZ5KbIOslOECOy8ZwmmB5fHP TZjTcZET_xihPQJSSl9eD0N9zwH8Ofc6sTGgsFM9PkqLbhj8ubHei1VC4liH2UjhnAX9OC0xjxJC 0umLcKku0d.hpUkBT0Utj0Fv31M7poH3dZZiazGOlPFdrLwybpsvDYwo7m669FceLypringJIpat kKtiYtVcNUvfWbyb5UdiZY.DZEAmBtktVq2zFyaN4rRys1JG_2arZYm0DgRAlsYzAwRdRx0jagVf itFV0ruIhUuNFznJvfCa6PqZIOGAZvsYCKSwonXqOb3lv9xjGg44vWdeH3I4Go.2rgeNpKAC772H aIYvswxNj8g48OBCFVeVkYNBemVg.RVtp9qWjwHTHtMo5wmW2yfqOg65IGD9_9bK2jgsxo.2g0RM IySEEed_6bNjC3sopTC3mq55ihYM26Yw2lhP444EE3jKLt7rQSI19QK7ilxgQWno.A3B2A3.Ug2r EqmR15YCRdEG2X2ofZk7epLTVTVsfif98Ben67TAzgOOCLFooAZa6mEanNcnNMtFCwtpUbiB3AbW xx0baHUbvTM_5qiNjfBBc0BYH5jWDU70rd6cNxVYjUYG1yQu76hYQSyibrnRexQIc5Q-- Received: from sonic.gate.mail.ne1.yahoo.com by sonic317.consmr.mail.ne1.yahoo.com with HTTP; Fri, 7 Jun 2019 01:05:41 +0000 Received: from c-67-170-167-181.hsd1.or.comcast.net (EHLO [192.168.1.115]) ([67.170.167.181]) by smtp411.mail.ne1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 0600df7bc35a82fe991dc851522bfdd0; Fri, 07 Jun 2019 00:55:34 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: 32-bit powerpc's elf_reloc_internal has no support for R_PPC_JMP_SLOT but clang with devel/powerpc64-binutils uses such for building kernel modules Message-Id: Date: Thu, 6 Jun 2019 17:55:33 -0700 To: FreeBSD PowerPC ML X-Mailer: Apple Mail (2.3445.104.11) X-Rspamd-Queue-Id: 3D6078EA71 X-Spamd-Bar: ++++ X-Spamd-Result: default: False [4.33 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; MV_CASE(0.50)[]; FREEMAIL_FROM(0.00)[yahoo.com]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; MX_GOOD(-0.01)[cached: mta6.am0.yahoodns.net]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; ASN(0.00)[asn:36646, ipnet:66.163.184.0/21, country:US]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com.dwl.dnswl.org : 127.0.5.0]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; FROM_HAS_DN(0.00)[]; NEURAL_SPAM_SHORT(0.95)[0.953,0]; MIME_GOOD(-0.10)[text/plain]; IP_SCORE(2.16)[ip: (8.43), ipnet: 66.163.184.0/21(1.35), asn: 36646(1.08), country: US(-0.06)]; NEURAL_SPAM_MEDIUM(0.90)[0.904,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(0.82)[0.824,0]; RCVD_IN_DNSWL_NONE(0.00)[44.184.163.66.list.dnswl.org : 127.0.5.0] X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Jun 2019 01:05:50 -0000 /usr/src/sys/powerpc/powerpc/elf64_machdep.c has: static int elf_reloc_internal(linker_file_t lf, Elf_Addr relocbase, const void = *data, int type, int local, elf_lookup_fn lookup) { . . . case R_PPC_JMP_SLOT: /* function descriptor copy */ lookup(lf, symidx, 1, &addr); #if !defined(_CALL_ELF) || _CALL_ELF =3D=3D 1 memcpy(where, (Elf_Addr *)addr, 3*sizeof(Elf_Addr)); #else *where =3D addr; #endif __asm __volatile("dcbst 0,%0; sync" :: "r"(where) : = "memory"); break; . . . But /usr/src/sys/powerpc/powerpc/elf32_machdep.c 's elf_reloc_internal does not have any R_PPC_JMP_SLOT case in its code. Yet, from using clang as the system compiler for targeting 32-bit = powerpc, readelf -asW /boot/kernel/if_gem.ko shows the likes of: Relocation section with addend (.rela.plt): r_offset r_info r_type st_value st_name + r_addend 00018328 00000215 R_PPC_JMP_SLOT 00000000 if_maddr_runlock + 0 00018330 00000315 R_PPC_JMP_SLOT 00000000 mii_mediachg + 0 00018338 00000415 R_PPC_JMP_SLOT 00000000 m_freem + 0 00018340 00000515 R_PPC_JMP_SLOT 00000000 device_get_softc + 0 00018348 00000715 R_PPC_JMP_SLOT 00000000 device_set_desc + 0 00018350 00000815 R_PPC_JMP_SLOT 00000000 printf + 0 00018358 00000b15 R_PPC_JMP_SLOT 00000000 ether_crc32_le + 0 00018360 00000e15 R_PPC_JMP_SLOT 00000000 bpf_mtap + 0 . . . # file /boot/kernel/if_gem.ko /boot/kernel/if_gem.ko: ELF 32-bit MSB shared object, PowerPC or cisco = 4500, version 1 (FreeBSD), dynamically linked, = BuildID[sha1]=3D013a358835fddcd6bbb82d35a6ce36243eccb743, not stripped So, naturally, module loading such (manual or automatic) is a problem for the 32-bit powerpc context. The context was head -r347549 . =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)