login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2007
»
September
»
19
Re: [PATCH] binfmt_flat: minimum support for theBlackfin relocations
view
thread
Previous message: [
thread
] [
date
] [author]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: David McCullough
Subject:
Re: [PATCH] binfmt_flat: minimum support for theBlackfin relocations
Date: Wednesday, September 19, 2007 - 6:55 pm
Jivin Robin Getz lays it down ...
quoted text
> On Tue 18 Sep 2007 04:09, Bryan Wu pondered: > > From: Bernd Schmidt <bernd.schmidt@analog.com> > > > > This just adds minimum support for the Blackfin relocations, > > since we don't have enough space in each reloc. The idea > > is to store a value with one relocation so that subsequent ones can > > access it. > > > > Signed-off-by: Bernd Schmidt <bernd.schmidt@analog.com> > > Signed-off-by: Bryan Wu <bryan.wu@analog.com> > > Cc: David McCullough <davidm@snapgear.com> > > Cc: Greg Ungerer <gerg@snapgear.com> > > Adding the other appropriate maintainers. for h8, m32r, sh and v850.
Looks fine to me, obviously impacts the existing arches very little. Can't see why it shouldn't get included, Cheers, Davidm
quoted text
> > --- > > fs/binfmt_flat.c | 5 ++++- > > include/asm-h8300/flat.h | 3 ++- > > include/asm-m32r/flat.h | 3 ++- > > include/asm-m68knommu/flat.h | 3 ++- > > include/asm-sh/flat.h | 3 ++- > > include/asm-v850/flat.h | 4 +++- > > 6 files changed, 15 insertions(+), 6 deletions(-) > > diff --git a/fs/binfmt_flat.c b/fs/binfmt_flat.c > > index 7b0265d..13b58f8 100644 > > --- a/fs/binfmt_flat.c > > +++ b/fs/binfmt_flat.c > > @@ -742,6 +742,7 @@ static int load_flat_file(struct linux_binprm * bprm, > > * __start to address 4 so that is okay). > > */ > > if (rev > OLD_FLAT_VERSION) { > > + unsigned long persistent = 0; > > for (i=0; i < relocs; i++) { > > unsigned long addr, relval; > > > > @@ -749,6 +750,8 @@ static int load_flat_file(struct linux_binprm * bprm, > > relocated (of course, the address has to be > > relocated first). */ > > relval = ntohl(reloc[i]); > > + if (flat_set_persistent (relval, &persistent)) > > + continue; > > addr = flat_get_relocate_addr(relval); > > rp = (unsigned long *) calc_reloc(addr, libinfo, id, 1); > > if (rp == (unsigned long *)RELOC_FAILED) { > > @@ -757,7 +760,7 @@ static int load_flat_file(struct linux_binprm * bprm, > > } > > > > /* Get the pointer's value. */ > > - addr = flat_get_addr_from_rp(rp, relval, flags); > > + addr = flat_get_addr_from_rp(rp, relval, flags, &persistent); > > if (addr != 0) { > > /* > > * Do the relocation. PIC relocs in the data section are > > diff --git a/include/asm-h8300/flat.h b/include/asm-h8300/flat.h > > index c20eee7..2a87350 100644 > > --- a/include/asm-h8300/flat.h > > +++ b/include/asm-h8300/flat.h > > @@ -9,6 +9,7 @@ > > #define flat_argvp_envp_on_stack() 1 > > #define flat_old_ram_flag(flags) 1 > > #define flat_reloc_valid(reloc, size) ((reloc) <= (size)) > > +#define flat_set_persistent(relval, p) 0 > > > > /* > > * on the H8 a couple of the relocations have an instruction in the > > @@ -18,7 +19,7 @@ > > */ > > > > #define flat_get_relocate_addr(rel) (rel) > > -#define flat_get_addr_from_rp(rp, relval, flags) \ > > +#define flat_get_addr_from_rp(rp, relval, flags, persistent) \ > > (get_unaligned(rp) & ((flags & FLAT_FLAG_GOTPIC) ? 0xffffffff: 0x00ffffff)) > > #define flat_put_addr_at_rp(rp, addr, rel) \ > > put_unaligned (((*(char *)(rp)) << 24) | ((addr) & 0x00ffffff), rp) > > diff --git a/include/asm-m32r/flat.h b/include/asm-m32r/flat.h > > index 1b285f6..d851cf0 100644 > > --- a/include/asm-m32r/flat.h > > +++ b/include/asm-m32r/flat.h > > @@ -15,9 +15,10 @@ > > #define flat_stack_align(sp) (*sp += (*sp & 3 ? (4 - (*sp & 3)): 0)) > > #define flat_argvp_envp_on_stack() 0 > > #define flat_old_ram_flag(flags) (flags) > > +#define flat_set_persistent(relval, p) 0 > > #define flat_reloc_valid(reloc, size) \ > > (((reloc) - textlen_for_m32r_lo16_data) <= (size)) > > -#define flat_get_addr_from_rp(rp, relval, flags) \ > > +#define flat_get_addr_from_rp(rp, relval, flags, persistent) \ > > m32r_flat_get_addr_from_rp(rp, relval, (text_len) ) > > > > #define flat_put_addr_at_rp(rp, addr, relval) \ > > diff --git a/include/asm-m68knommu/flat.h b/include/asm-m68knommu/flat.h > > index 2d836ed..814b517 100644 > > --- a/include/asm-m68knommu/flat.h > > +++ b/include/asm-m68knommu/flat.h > > @@ -9,8 +9,9 @@ > > #define flat_argvp_envp_on_stack() 1 > > #define flat_old_ram_flag(flags) (flags) > > #define flat_reloc_valid(reloc, size) ((reloc) <= (size)) > > -#define flat_get_addr_from_rp(rp, relval, flags) get_unaligned(rp) > > +#define flat_get_addr_from_rp(rp, relval, flags, p) get_unaligned(rp) > > #define flat_put_addr_at_rp(rp, val, relval) put_unaligned(val,rp) > > #define flat_get_relocate_addr(rel) (rel) > > +#define flat_set_persistent(relval, p) 0 > > > > #endif /* __M68KNOMMU_FLAT_H__ */ > > diff --git a/include/asm-sh/flat.h b/include/asm-sh/flat.h > > index 0d5cc04..dc4f595 100644 > > --- a/include/asm-sh/flat.h > > +++ b/include/asm-sh/flat.h > > @@ -16,8 +16,9 @@ > > #define flat_argvp_envp_on_stack() 0 > > #define flat_old_ram_flag(flags) (flags) > > #define flat_reloc_valid(reloc, size) ((reloc) <= (size)) > > -#define flat_get_addr_from_rp(rp, relval, flags) get_unaligned(rp) > > +#define flat_get_addr_from_rp(rp, relval, flags, p) get_unaligned(rp) > > #define flat_put_addr_at_rp(rp, val, relval) put_unaligned(val,rp) > > #define flat_get_relocate_addr(rel) (rel) > > +#define flat_set_persistent(relval, p) 0 > > > > #endif /* __ASM_SH_FLAT_H */ > > diff --git a/include/asm-v850/flat.h b/include/asm-v850/flat.h > > index 3888f59..17f0ea5 100644 > > --- a/include/asm-v850/flat.h > > +++ b/include/asm-v850/flat.h > > @@ -25,6 +25,7 @@ > > #define flat_stack_align(sp) /* nothing needed */ > > #define flat_argvp_envp_on_stack() 0 > > #define flat_old_ram_flag(flags) (flags) > > +#define flat_set_persistent(relval, p) 0 > > > > /* We store the type of relocation in the top 4 bits of the `relval.' > > */ > > > > @@ -46,7 +47,8 @@ flat_get_relocate_addr (unsigned long relval) > > For the v850, RP should always be half-word aligned. */ > > static inline unsigned long flat_get_addr_from_rp (unsigned long *rp, > > unsigned long relval, > > - unsigned long flags) > > + unsigned long flags, > > + unsigned long *persistent) > > { > > short *srp = (short *)rp;
-- David McCullough,
david_mccullough@securecomputing.com
, Ph:+61 734352815 Secure Computing - SnapGear
http://www.uCdot.org
http://www.cyberguard.com
-
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [author]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[PATCH] binfmt_flat: minimum support for the Blackfin relo ...
, Bryan Wu
, (Tue Sep 18, 1:09 am)
Re: [Uclinux-dist-devel] [PATCH] binfmt_flat: minimum supp ...
, Bryan Wu
, (Wed Sep 19, 8:52 am)
Re: [PATCH] binfmt_flat: minimum support for theBlackfin r ...
, Robin Getz
, (Wed Sep 19, 6:31 pm)
Re: [PATCH] binfmt_flat: minimum support for theBlackfin r ...
, David McCullough
, (Wed Sep 19, 6:55 pm)
Re: [PATCH] binfmt_flat: minimum support for theBlackfin r ...
, Robin Getz
, (Wed Sep 19, 7:46 pm)
Re: [PATCH] binfmt_flat: minimum support for theBlackfin r ...
, Paul Mundt
, (Wed Sep 19, 8:18 pm)
Re: [PATCH] binfmt_flat: minimum support for theBlackfin r ...
, Mike Frysinger
, (Wed Sep 19, 8:42 pm)
Re: [PATCH] binfmt_flat: minimum support for theBlackfin r ...
, Paul Mundt
, (Wed Sep 19, 8:54 pm)
Re: [PATCH] binfmt_flat: minimum support for theBlackfin r ...
, Robin Getz
, (Wed Sep 19, 11:08 pm)
Re: [PATCH] binfmt_flat: minimum support for theBlackfin r ...
, Bryan Wu
, (Wed Sep 19, 11:34 pm)
Re: [PATCH] binfmt_flat: minimum support for theBlackfin r ...
, Bryan Wu
, (Wed Sep 19, 11:41 pm)
Re: [PATCH] binfmt_flat: minimum support for theBlackfin r ...
, Miles Bader
, (Thu Sep 20, 12:35 am)
Re: [PATCH] binfmt_flat: minimum support for theBlackfin r ...
, Hirokazu Takata
, (Thu Sep 20, 12:42 am)
Re: [PATCH] binfmt_flat: minimum support for theBlackfin r ...
, Bernd Schmidt
, (Thu Sep 20, 5:04 am)
Re: [PATCH] binfmt_flat: minimum support for theBlackfin r ...
, Paul Mundt
, (Thu Sep 20, 7:25 am)
Re: [PATCH] binfmt_flat: minimum support for theBlackfin r ...
, Bernd Schmidt
, (Thu Sep 20, 7:56 am)
Re: [PATCH] binfmt_flat: minimum support for theBlackfin r ...
, David McCullough
, (Thu Sep 20, 8:03 am)
Re: [PATCH] binfmt_flat: minimum support for theBlackfin r ...
, Robin Getz
, (Thu Sep 20, 6:44 pm)
Re: [PATCH] binfmt_flat: minimum support for theBlackfin r ...
, David McCullough
, (Thu Sep 20, 8:32 pm)
Re: [PATCH] binfmt_flat: minimum support for theBlackfin r ...
, Bryan Wu
, (Fri Sep 28, 8:46 am)
Re: [PATCH] binfmt_flat: minimum support for the Blackfin ...
, Andrew Morton
, (Fri Sep 28, 4:08 pm)
Re: [PATCH] binfmt_flat: minimum support for the Blackfin ...
, Bernd Schmidt
, (Fri Sep 28, 4:48 pm)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Francis Moreau
Re: Disk geometry from /sys
Christoph Lameter
Re: [bug] SLUB + mm/slab.c boot crash in -rc9
Jeremy Fitzhardinge
Re: [2.6.25] compat VDSO option not disabling
Rafael J. Wysocki
[Bug #11551] Semi-repeatable hard lockup on 2.6.27-rc6
Eberhard Moenkeberg
Re: OT: character encodings (was: Linux 2.6.20-rc4)
git
:
Pat Thoyts
[PATCH] git-gui: use themed tk widgets with Tk 8.5
Tait
Re: [PATCH] Replace hard-coded path with one from <paths.h>
Michael Witten
Re: 'git gc --aggressive' effectively unusable
Frans Pop
'git gc --aggressive' effectively unusable
Stephan Beyer
Re: git sequencer prototype
git-commits-head
:
Linux Kernel Mailing List
tracing: Simplify trace_option_write()
Linux Kernel Mailing List
V4L/DVB (10826): cx88: Add IR support to pcHDTV HD3000 & HD5500
Linux Kernel Mailing List
ARM: dma-mapping: fix for speculative prefetching
Linux Kernel Mailing List
Fast TSC calibration: calculate proper frequency error bounds
Linux Kernel Mailing List
ACPICA: Fix to allow zero-length ASL field declarations
linux-netdev
:
William Allen Simpson
[net-next-2.6 PATCH v8 0/7] TCPCT part 1: cookie option exchange
Eric Dumazet
Re: [PATCH net-next-2.6] net: Introduce skb_orphan_try()
David Miller
Re: [PATCH] IPv6: preferred lifetime of address not getting updated
Eric Dumazet
Re: [PATCH net-next-2.6] net: Introduce skb_orphan_try()
Mark McLoughlin
Re: [PATCH 2/3] virtio: fix delayed xmit of packet and freeing of old packets.
openbsd-misc
:
Robert
disklabel - cylinder rounding
nixlists
Re: Which laptops do the developers use?
Samuel Baldwin
Re: Forum engine
L. V. Lammert
OT, .. but has anyone seen a crontab editor
Darrin Chandler
Re: That whole "Linux stealing our code" thing
Colocation donated by:
Syndicate