From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/9171 Path: news.gmane.org!not-for-mail From: Mahesh Bodapati Newsgroups: gmane.linux.lib.musl.general Subject: Re: musl mips n64 dynamic build Date: Fri, 22 Jan 2016 13:21:00 +0530 Message-ID: References: <20151019151840.GM8645@brightrain.aerifal.cx> <20151020104019.GC10551@port70.net> <20151027013045.GT8645@brightrain.aerifal.cx> <56A12D5F.6070407@openwrt.org> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11346410ee54170529e77a30 X-Trace: ger.gmane.org 1453449076 29000 80.91.229.3 (22 Jan 2016 07:51:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 22 Jan 2016 07:51:16 +0000 (UTC) To: Felix Fietkau , musl@lists.openwall.com Original-X-From: musl-return-9184-gllmg-musl=m.gmane.org@lists.openwall.com Fri Jan 22 08:51:16 2016 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1aMWV1-0004jF-R4 for gllmg-musl@m.gmane.org; Fri, 22 Jan 2016 08:51:15 +0100 Original-Received: (qmail 24212 invoked by uid 550); 22 Jan 2016 07:51:12 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 24194 invoked from network); 22 Jan 2016 07:51:11 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=LVpP26A/waAunc3/QCMKjyn6GIqvKHkmQaEXfjmau9M=; b=TmyJHk3StTXkzQ1uLabyRbwrzOWZ3PEfIy4VW3WtA6SilAv8f5MyEdkGpg8uxjO+Oa F7hzCz1BG5Wt7i6xRT4hZtkC1j0UjpVvRS432twGVBMt93G8KWYVhPEmzywpCXnX7lHW kvjZ5n98xkP5zS47L1B5xVlU5HJbCq6XjRYmSvv3kn1VYLUw7tXURofELhlho2SHrEt8 uQCWETIaZrLaEitbENROxMgyf/uvGW7hxH5+e0vDIMPPdlRhBL4DYKO5uMYxjYqcFeUM PP6kf6OefgJjgFsTbtV6Yk0N14PC1axvYh8tK3dJb0WTyo8qWbxLaZdKw4ZgR/GQBqEt 0xdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=LVpP26A/waAunc3/QCMKjyn6GIqvKHkmQaEXfjmau9M=; b=iUW2JU3odOBq7W1LvXS18xMg19kwaGt0iKVOh7xEF+zM9Wz/6Jz/GtMpuLXGzek/dz xa9POoL07BVCBy4u5dGdbgcpAODNevFNOZTdER60gJxBzC3ZvRwHrrGNNHfQmmK4oAwd Wav+VsYVedzK0u3yC67q3YwKmuxUXirp1Cb+n54uLMLgQT6fCybKne6KZu7JXyz8o/tx c+RtWdZUzH6cqmx5BrFy6Btcw8JP0zugMsA4SqCyAmMNp5lGQ6j1t9oz0fEffIBqjMuX NOlH5SP1ftFGfKtlnAV2sW9TBr50BlgJ/vCHJ78gUN4a/17RWNjlhDZd53O+qf93RKy7 6Lwg== X-Gm-Message-State: AG10YOQai94R9qEc1alNVTNs15r4BWu58wljRvUoev86IRksGUsw3xPqfon7DisopxszOJup61+FJKojqrlv0w== X-Received: by 10.50.155.65 with SMTP id vu1mr2185019igb.2.1453449060174; Thu, 21 Jan 2016 23:51:00 -0800 (PST) In-Reply-To: <56A12D5F.6070407@openwrt.org> Xref: news.gmane.org gmane.linux.lib.musl.general:9171 Archived-At: --001a11346410ee54170529e77a30 Content-Type: text/plain; charset=UTF-8 yes,This is working.MIPS64 relocation type is a combination of 3 relocation types each of size 1 byte. typedef struct { Elf32_Word r_sym; /* Symbol index */ unsigned char r_ssym; /* Special symbol for 2nd relocation */ unsigned char r_type3; /* 3rd relocation type */ unsigned char r_type2; /* 2nd relocation type */ unsigned char r_type1; /* 1st relocation type */ } _Elf64_Mips_R_Info; (R_MIPS_64 << 8) | R_MIPS_REL32 is (18 << 8) | 3 = 4611 Thanks, Mahesh On Fri, Jan 22, 2016 at 12:41 AM, Felix Fietkau wrote: > On 2015-10-27 02:30, Rich Felker wrote: > > On Tue, Oct 20, 2015 at 12:40:21PM +0200, Szabolcs Nagy wrote: > >> * Mahesh Bodapati [2015-10-20 15:14:04 > +0530]: > >> > Error relocating libc.so: unsupported relocation type 4611 > >> > Error relocating libc.so: unsupported relocation type 4611 > >> > Error relocating libc.so: unsupported relocation type 4611 > >> .... > >> > *#define REL_SYM_OR_REL R_MIPS_64 /*I didn't see > R_MIPS_REL64 so > >> > It is a composition of R_MIPS_64 and R_MIPS_REL relocations but i > didn't > >> > see R_MIPS_REL in elf.h. * > >> > * > >> > how can i define REL_SYM_OR_REL for mips n64 abi */* > >> > >> i don't know what the n64 abi docs says, but this might be a hint: > >> > >> glibc/sysdeps/mips/dl-machine.h has > >> > >> #if _MIPS_SIM == _ABI64 > >> case (R_MIPS_64 << 8) | R_MIPS_REL32: > >> #else > >> case R_MIPS_REL32: > >> #endif > >> > >> where R_MIPS_64 << 8 | R_MIPS_REL32 is 4611. > > > > This seems right. Mahesh, did you get a chance to try this? Does it > > help? > Manesh, any update on this? I'm really interested in musl MIPS64 support > for OpenWrt - I'd like to move away from glibc for that arch. > I can also help with testing and bugfixing once this is getting > somewhere... > > Thanks, > > - Felix > --001a11346410ee54170529e77a30 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
yes,This is working.MIPS64 relocation type is a combinatio= n of 3 relocation types each of size 1 byte.

typedef stru= ct
{
=C2=A0 Elf32_Word =C2=A0 =C2=A0r_sym; =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0/* Symbol index */
=C2=A0 unsigned char r= _ssym; =C2=A0 =C2=A0 =C2=A0 =C2=A0 /* Special symbol for 2nd relocation */<= /div>
=C2=A0 unsigned char r_type3; =C2=A0 =C2=A0 =C2=A0 =C2=A0/* 3rd r= elocation type */
=C2=A0 unsigned char r_type2; =C2=A0 =C2=A0 =C2= =A0 =C2=A0/* 2nd relocation type */
=C2=A0 unsigned char r_type1;= =C2=A0 =C2=A0 =C2=A0 =C2=A0/* 1st relocation type */
} _Elf64_Mi= ps_R_Info;

(R_MIPS_64 << 8) | R_MIPS_REL32 =C2=A0 =C2= =A0 is (18 << 8) | 3 =3D 4611

Thanks,
Mahesh

On Fri, Jan 22, 2016 at 12= :41 AM, Felix Fietkau <nbd@openwrt.org> wrote:
On 2015-10-27 02:30, Rich Felker wrote:=
> On Tue, Oct 20, 2015 at 12:40:21PM +0200, Szabolcs Nagy wrote:
>> * Mahesh Bodapati <maheshbodapati90@gmail.com> [2015-10-20 15:14:04 +0530]:
>> > Error relocating libc.so: unsupported relocation type 4611 >> > Error relocating libc.so: unsupported relocation type 4611 >> > Error relocating libc.so: unsupported relocation type 4611 >> ....
>> > *#define REL_SYM_OR_REL=C2=A0 R_MIPS_64=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0/*I didn't see R_MIPS_REL64=C2=A0 so
>> > It is a composition of R_MIPS_64 and R_MIPS_REL relocations b= ut i didn't
>> > see R_MIPS_REL in elf.h. *
>> > *
>> >=C2=A0 how can i define REL_SYM_OR_REL for mips n64 abi=C2=A0 = =C2=A0*/*
>>
>> i don't know what the n64 abi docs says, but this might be a h= int:
>>
>> glibc/sysdeps/mips/dl-machine.h has
>>
>> #if _MIPS_SIM =3D=3D _ABI64
>>=C2=A0 =C2=A0 =C2=A0case (R_MIPS_64 << 8) | R_MIPS_REL32:
>> #else
>>=C2=A0 =C2=A0 =C2=A0case R_MIPS_REL32:
>> #endif
>>
>> where R_MIPS_64 << 8 | R_MIPS_REL32 is 4611.
>
> This seems right. Mahesh, did you get a chance to try this? Does it > help?
Manesh, any update on this? I'm really interested in musl MIPS64= support
for OpenWrt - I'd like to move away from glibc for that arch.
I can also help with testing and bugfixing once this is getting somewhere..= .

Thanks,

- Felix

--001a11346410ee54170529e77a30--