Message ID | CAODfWeEEr6ENbqrw4_CsCJ20qh-MTMBRvMcb700tomOCZjnEdw@mail.gmail.com |
---|---|
State | New, archived |
Headers |
Received: (qmail 35904 invoked by alias); 24 Mar 2015 16:07:06 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: <gdb-patches.sourceware.org> List-Unsubscribe: <mailto:gdb-patches-unsubscribe-##L=##H@sourceware.org> List-Subscribe: <mailto:gdb-patches-subscribe@sourceware.org> List-Archive: <http://sourceware.org/ml/gdb-patches/> List-Post: <mailto:gdb-patches@sourceware.org> List-Help: <mailto:gdb-patches-help@sourceware.org>, <http://sourceware.org/ml/#faqs> Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 35891 invoked by uid 89); 24 Mar 2015 16:07:05 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.5 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, KAM_FROM_URIBL_PCCC, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=no version=3.3.2 X-HELO: mail-la0-f51.google.com Received: from mail-la0-f51.google.com (HELO mail-la0-f51.google.com) (209.85.215.51) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Tue, 24 Mar 2015 16:07:03 +0000 Received: by laae1 with SMTP id e1so31254986laa.2 for <gdb-patches@sourceware.org>; Tue, 24 Mar 2015 09:07:00 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.152.21.168 with SMTP id w8mr4425334lae.46.1427213220461; Tue, 24 Mar 2015 09:07:00 -0700 (PDT) Received: by 10.112.154.4 with HTTP; Tue, 24 Mar 2015 09:07:00 -0700 (PDT) Date: Tue, 24 Mar 2015 17:07:00 +0100 Message-ID: <CAODfWeEEr6ENbqrw4_CsCJ20qh-MTMBRvMcb700tomOCZjnEdw@mail.gmail.com> Subject: [patch] libcc1: dynamic load versioned library From: Hector Oron <hector.oron@gmail.com> To: gdb-patches@sourceware.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable |
Commit Message
Hector Oron
March 24, 2015, 4:07 p.m. UTC
Hello, I believe libcc1 is versioned library therefore, it should dlopen on libcc1.so.0 instead libcc1.so. The patch should be applied to master and 7.9 branch. Héctor Orón Martínez * include/gcc-c-interface.h (gcc_c_context): load libcc1 versioned library Regards,
Comments
> Date: Tue, 24 Mar 2015 17:07:00 +0100 > From: Hector Oron <hector.oron@gmail.com> > > Hello, > > I believe libcc1 is versioned library therefore, it should dlopen on > libcc1.so.0 instead libcc1.so. > The patch should be applied to master and 7.9 branch. And what happens if the major version of the library is bumped? > Héctor Orón Martínez > > * include/gcc-c-interface.h (gcc_c_context): load libcc1 versioned library > > --- gdb-7.9.orig/include/gcc-c-interface.h > +++ gdb-7.9/include/gcc-c-interface.h > @@ -197,7 +197,7 @@ struct gcc_c_context > /* The name of the .so that the compiler builds. We dlopen this > later. */ > > -#define GCC_C_FE_LIBCC libcc1.so > +#define GCC_C_FE_LIBCC libcc1.so.0 > > /* The compiler exports a single initialization function. This macro > holds its name as a symbol. */ > > Regards, > -- > Héctor Orón -.. . -... .. .- -. -.. . ...- . .-.. --- .--. . .-. > >
Hello, 2015-03-24 17:33 GMT+01:00 Mark Kettenis <mark.kettenis@xs4all.nl>: >> From: Hector Oron <hector.oron@gmail.com> >> >> Hello, >> >> I believe libcc1 is versioned library therefore, it should dlopen on >> libcc1.so.0 instead libcc1.so. >> The patch should be applied to master and 7.9 branch. > > And what happens if the major version of the library is bumped? Does that mean that there is some ABI break which might imply or not newer changes on GDB side? >> Héctor Orón Martínez >> >> * include/gcc-c-interface.h (gcc_c_context): load libcc1 versioned library >> >> --- gdb-7.9.orig/include/gcc-c-interface.h >> +++ gdb-7.9/include/gcc-c-interface.h >> @@ -197,7 +197,7 @@ struct gcc_c_context >> /* The name of the .so that the compiler builds. We dlopen this >> later. */ >> >> -#define GCC_C_FE_LIBCC libcc1.so >> +#define GCC_C_FE_LIBCC libcc1.so.0 >> >> /* The compiler exports a single initialization function. This macro >> holds its name as a symbol. */ >> >> Regards, >> -- >> Héctor Orón -.. . -... .. .- -. -.. . ...- . .-.. --- .--. . .-. >> >>
On 24 Mar 2015 17:33, Mark Kettenis wrote: > From: Hector Oron <hector.oron@gmail.com> > > I believe libcc1 is versioned library therefore, it should dlopen on > > libcc1.so.0 instead libcc1.so. > > The patch should be applied to master and 7.9 branch. > > And what happens if the major version of the library is bumped? then we need to handle it ? there's no guarantee the ABI is compatible ... if it was, then it probably wouldn't have changed SONAMEs. usually the libxxx.so symlink isn't generated on runtime systems. you need to install extra dev packages to get it. so loading the SONAME directly is almost always the right thing. -mike
--- gdb-7.9.orig/include/gcc-c-interface.h +++ gdb-7.9/include/gcc-c-interface.h @@ -197,7 +197,7 @@ struct gcc_c_context /* The name of the .so that the compiler builds. We dlopen this later. */ -#define GCC_C_FE_LIBCC libcc1.so +#define GCC_C_FE_LIBCC libcc1.so.0 /* The compiler exports a single initialization function. This macro holds its name as a symbol. */