[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: [kde-freebsd] Re: objprelink patch for freebsd
From:       Andy Fawcett <andy () athame ! co ! uk>
Date:       2001-12-05 6:43:29
[Download RAW message or body]

Hi Alan,

The original objprelink was doing pretty much nothing on FreeBSD, for 
precisely the reasons Bradley updated it.

As such, there should have been no negative effects, although of course 
nobody would guarantee that without reviewing every file altered by it.

But since objprelink most likely wouldn't have found any references with 
the linux-style prefix, I think it was pretty safe.

Andy


At 10:03 4.12.2001 -0500, Alan Eldridge wrote:
>So, this means that what we've got now isn't working? Could it have any
>negative affects the way it is... bad paging behavior, for example?
>
>On Tue, Dec 04, 2001 at 02:39:17PM +0100, Bradley T Hughes wrote:
> >On Tuesday 04 December 2001 14:11, Bradley T Hughes wrote:
> >
> >And of course, it helps if I post the correct patch.  This is the corerct
> >one:
> >
> >--- objprelink.c~       Tue Dec  4 12:34:01 2001
> >+++ objprelink.c        Tue Dec  4 14:10:09 2001
> >@@ -239,12 +239,12 @@
> > is_vt_section(bfd *abfd, asection *p)
> > {
> >   const char *name = bfd_section_name(abfd, p);
> >-  static const char prefix[] = ".gnu.linkonce.d.__vt_";
> >+  static const char prefix[] = ".gnu.linkonce.d._vt";
> >   static flagword w =
> >(SEC_ALLOC|SEC_LOAD|SEC_RELOC|SEC_DATA|SEC_LINK_ONCE);
> >   flagword f = bfd_get_section_flags (abfd, p);
> >   if (f & w == w)
> >     if (!strncmp(name, prefix, sizeof(prefix)-1))
> >-      return name + sizeof(prefix)-6;
> >+      return name + sizeof(prefix)-4;
> >   return false;
> > }
> >
> >> in case someone is interested, this make objprelink work on freebsd:
> >>
> >> --- objprelink.c        Tue Dec  4 14:10:09 2001
> >> +++ objprelink.c~       Tue Dec  4 12:34:01 2001
> >> @@ -239,12 +239,12 @@
> >>  is_vt_section(bfd *abfd, asection *p)
> >>  {
> >>    const char *name = bfd_section_name(abfd, p);
> >> -  static const char prefix[] = ".gnu.linkonce.d._vt";
> >> +  static const char prefix[] = ".gnu.linkonce.d.__vt_";
> >>    static flagword w =
> >> (SEC_ALLOC|SEC_LOAD|SEC_RELOC|SEC_DATA|SEC_LINK_ONCE);
> >>    flagword f = bfd_get_section_flags (abfd, p);
> >>    if (f & w == w)
> >>      if (!strncmp(name, prefix, sizeof(prefix)-1))
> >> -      return name + sizeof(prefix)-4;
> >> +      return name + sizeof(prefix)-6;
> >>    return false;
> >>  }
> >>
> >> The reason it didn't work before is because the virtual table symbol
> >> prefixes were different from those hard coded in the source.
> >>
> >> Enjoy...
> >
> >--
> >--
> >Bradley T. Hughes <bhughes@trolltech.com>
> >Trolltech AS - Waldemar Thranes gt. 98 N-0175 Oslo, Norway
> >Office: +47 21604892
> >Mobile: +47 92019781
> >_______________________________________________
> >kde-freebsd mailing list
> >kde-freebsd@lists.csociety.org
> >http://lists.csociety.org/listinfo/kde-freebsd
>
>--
>Alan Eldridge
>#include <cstdlib>
>free(sklyarov);
>_______________________________________________
>kde-freebsd mailing list
>kde-freebsd@lists.csociety.org
>http://lists.csociety.org/listinfo/kde-freebsd

-- 
Andy Fawcett          | "In an open world without walls and fences,
andy@athame.co.uk     | we wouldn't need Windows and Gates." --anon
http://athame.ath.cx/ |

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic