linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Olof Johansson <olof@lixom.net>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linuxppc-dev list <linuxppc-dev@ozlabs.org>,
	Paul Mackerras <paulus@samba.org>
Subject: Re: [PATCH 4/5] powerpc: Support feature fixups in modules
Date: Fri, 20 Oct 2006 01:01:47 -0500	[thread overview]
Message-ID: <20061020010147.3ef4694e@pb15> (raw)
In-Reply-To: <1161308839.10524.111.camel@localhost.localdomain>

On Fri, 20 Oct 2006 11:47:19 +1000 Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:

> This patch adds support for feature fixups in modules. This involves
> adding support for R_PPC64_REL64 relocs to the 64 bits module loader.
> It also modifies modpost.c to ignore the powerpc fixup sections (or it
> would warn when used in .init.text).
> 
> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

Acked-by: Olof Johansson <olof@lixom.net>

> Index: linux-cell/arch/powerpc/kernel/module_32.c
> ===================================================================
> --- linux-cell.orig/arch/powerpc/kernel/module_32.c	2006-10-13 16:00:26.000000000 +1000
> +++ linux-cell/arch/powerpc/kernel/module_32.c	2006-10-13 16:59:36.000000000 +1000
[...]
> +static const Elf_Shdr *find_section(const Elf_Ehdr *hdr,
> +				    const Elf_Shdr *sechdrs,
> +				    const char *name)
> +{
> +	char *secstrings;
> +	unsigned int i;
> +
> +	secstrings = (char *)hdr + sechdrs[hdr->e_shstrndx].sh_offset;
> +	for (i = 1; i < hdr->e_shnum; i++)
> +		if (strcmp(secstrings+sechdrs[i].sh_name, name) == 0)
> +			return &sechdrs[i];
> +	return NULL;
> +}
> +

It would be nice if this could be put in some common location instead
of duplicated between the two files. It builds differently on 32 and 64
bits due to the type defines, but both will never be used in the same
kernel.


-Olof

  reply	other threads:[~2006-10-20  6:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-20  1:47 [PATCH 4/5] powerpc: Support feature fixups in modules Benjamin Herrenschmidt
2006-10-20  6:01 ` Olof Johansson [this message]
2006-10-20  6:06   ` Benjamin Herrenschmidt
  -- strict thread matches above, loose matches on Subject: below --
2006-10-13  8:04 Benjamin Herrenschmidt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20061020010147.3ef4694e@pb15 \
    --to=olof@lixom.net \
    --cc=benh@kernel.crashing.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=paulus@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).