From owner-freebsd-mips@FreeBSD.ORG Thu Mar 31 21:18:02 2011 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DB8BE10656D3 for ; Thu, 31 Mar 2011 21:18:02 +0000 (UTC) (envelope-from c.jayachandran@gmail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 6B3DC8FC2C for ; Thu, 31 Mar 2011 21:18:02 +0000 (UTC) Received: by wyf23 with SMTP id 23so2894572wyf.13 for ; Thu, 31 Mar 2011 14:18:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=UOq/a0vRwN4DRC9dLWJ5IRh5YjazRR66EfSlxgiVSlM=; b=P7Jh3QTHVcaB0U1ZvbwGnT1geJ5uw/k4luNsKoEsRpXKyjY6wYvUK/oqSQZOnG/4Pw vORlB8VcVyozGW2WedelujDrQeSS/kca1TravOcnNGkIcl3V7m/yeqAwPA9WJupaEpm8 hn7yI9JstZ5ZJ3mwm9bZj+UjkooKQ6ipnlmIk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=vkrO6iTrF1Bnji6ihwvoXZtF5UkmZITyofrisuTZB2a/ROGFp7RUQMyssn3GICj4YJ VvldKWW2U9kKLKwKXhTpu+1her8FzokGMEuZ0MucjbpvXKdyYlxa0FMtPXLokwqZcj3U Mx39I/7tZOmyF5fV/iXGHZHR39K1oTHL60Brg= MIME-Version: 1.0 Received: by 10.227.140.11 with SMTP id g11mr3224863wbu.57.1301606281384; Thu, 31 Mar 2011 14:18:01 -0700 (PDT) Received: by 10.227.155.141 with HTTP; Thu, 31 Mar 2011 14:18:01 -0700 (PDT) In-Reply-To: References: Date: Thu, 31 Mar 2011 14:18:01 -0700 Message-ID: From: "Jayachandran C." To: Radha Mohan Content-Type: text/plain; charset=ISO-8859-1 Cc: Adrian Chadd , freebsd-mips@freebsd.org Subject: Re: linker weirdness for MIPS kernel? X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Mar 2011 21:18:02 -0000 On Tue, Mar 29, 2011 at 10:31 PM, Radha Mohan wrote: > Hi JC, > > Incidentally I am also trying to load modules under FreeBSD on my MIPS platform, > but I am getting following error. > > # /sbin/kldload -v ext2fs > linker_load_file: Unsupported file type > kldload:can't load ext2fs: Exec format error > > For me all the modules give me this error. > > From what I understood going through the module loading code is the > linker_load_file() > function is trying for all the registered classes (elf64_obj and elf64 > in my case). But the > relocatable header type is handled in the link_elf_obj.c only and not > link_elf.c . > > There is still some support lacking for the mips64 relocation in terms > of getting "mapbase" > (currently its taking only amd64 architecture into consideration)and > handling addend (ELF_RELOC_RELA), > R_MIPS_64, R_MIPS_HIGHER and R_MIPS_HIGHEST. Is this on the 64bit kernel or on the 32bit version? I don't use kernel modules in our XLR setup. I am a bit overloaded now with other stuff, but if you have any patches to fix this, I can help test and merge them... JC.