From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Mon, 21 Jul 2003 18:34:09 +0400 From: "Dmitry V. Levin" To: ALT Devel discussion list Subject: Re: [devel] binutils Message-ID: <20030721143409.GA23135@basalt.office.altlinux.org> Mail-Followup-To: ALT Devel discussion list References: <20030712174202.GB2592@sam-solutions.net> <20030714083114.GD2170@basalt.office.altlinux.org> <20030714091220.GB1436@sam-solutions.net> <20030720001251.GD3837@basalt.office.altlinux.org> <20030720182510.GA16395@basalt.office.altlinux.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="KFztAG8eRSV9hGtP" Content-Disposition: inline In-Reply-To: X-fingerprint: 9658 398D 181B 1200 8FC5 26B8 F6F8 846B C1E2 3429 X-BeenThere: devel@altlinux.ru X-Mailman-Version: 2.1.2 Precedence: list Reply-To: ALT Devel discussion list List-Id: ALT Devel discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jul 2003 14:34:18 -0000 Archived-At: List-Archive: List-Post: --KFztAG8eRSV9hGtP Content-Type: multipart/mixed; boundary="UlVJffcvxoiEqYs2" Content-Disposition: inline Content-Transfer-Encoding: 8bit --UlVJffcvxoiEqYs2 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: 8bit On Mon, Jul 21, 2003 at 03:31:08PM +0400, Vitaly Lugovsky wrote: > On Sun, 20 Jul 2003, Dmitry V. Levin wrote: > > > То изменение, которое непосредственно затрагивает ocaml-shared, > > судя по binutils-2.14.90.0.4/bfd/ChangeLog, было сделано в > > здравом уме: > > Может быть. Но обоснований то не было... :( > > > (elf_link_output_extsym): Warn if a forced local symbol is > > referenced from dynamic objects. Make non-weak undefined symbol > > with non-default visibility a fatal error. > > Только это изменение и существенно. По некоторым, до сих пор мне > не совсем понятным причинам, Malc-у потребовалось определять > глобальные символы из OCaml runtime как .protected и .hidden в > каждой динамически подгружаемой библиотеке (то есть примерно > понятно - чтоб они реально ссылались на соответствующие > определения в статическом бинарнике, обращающемся к той самой > библиотеке). Зачем это запрещать - ни хрена не ясно. > > Попробую спросить автора изменений. > > Но вообще - мой patch только то и делает, что отменяет это > дурное ужесточение policy... Ok, аналогичный временный патч пойдёт в Сизиф (attached). > > Так что лучше всего пообщаться с автором изменений. > > Попробую... Такой крутой народ, однако, обычно вообще не > реагирует на сообщения... Ничего страшного, hjl вполне вменяемый. -- ldv --UlVJffcvxoiEqYs2 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="binutils-2.14.90.0.4-alt-bfd_elflink_relax_checking.patch" --- binutils-2.14.90.0.4/bfd/elflink.h.orig 2003-07-20 22:03:16 +0400 +++ binutils-2.14.90.0.4/bfd/elflink.h 2003-07-21 18:08:43 +0400 @@ -4483,20 +4483,22 @@ elf_link_output_extsym (h, data) (*_bfd_error_handler) (_("%s: %s symbol `%s' in %s is referenced by DSO"), bfd_get_filename (finfo->output_bfd), ELF_ST_VISIBILITY (h->other) == STV_INTERNAL ? "internal" : ELF_ST_VISIBILITY (h->other) == STV_HIDDEN ? "hidden" : "local", h->root.root.string, bfd_archive_filename (h->root.u.def.section->owner)); +#ifdef ENABLE_STRICT_SYMBOL_CHECKING eoinfo->failed = TRUE; return FALSE; +#endif /* ENABLE_STRICT_SYMBOL_CHECKING */ } /* We don't want to output symbols that have never been mentioned by a regular file, or that we have been told to strip. However, if h->indx is set to -2, the symbol is used by a reloc and we must output it. */ if (h->indx == -2) strip = FALSE; else if (((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0 @@ -4665,20 +4667,22 @@ elf_link_output_extsym (h, data) { (*_bfd_error_handler) (_("%s: %s symbol `%s' isn't defined"), bfd_get_filename (finfo->output_bfd), ELF_ST_VISIBILITY (sym.st_other) == STV_PROTECTED ? "protected" : ELF_ST_VISIBILITY (sym.st_other) == STV_INTERNAL ? "internal" : "hidden", h->root.root.string); +#ifdef ENABLE_STRICT_SYMBOL_CHECKING eoinfo->failed = TRUE; return FALSE; +#endif /* ENABLE_STRICT_SYMBOL_CHECKING */ } /* If this symbol should be put in the .dynsym section, then put it there now. We already know the symbol index. We also fill in the entry in the .hash section. */ if (h->dynindx != -1 && elf_hash_table (finfo->info)->dynamic_sections_created) { size_t bucketcount; --UlVJffcvxoiEqYs2-- --KFztAG8eRSV9hGtP Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (GNU/Linux) iD8DBQE/G/nh9viEa8HiNCkRAoW8AJ0VszBjjoEKpw6pIF1IFjVFi4YdPwCcDIFl gkDSGxpWk4Zm6zLceNiGmPE= =HxJW -----END PGP SIGNATURE----- --KFztAG8eRSV9hGtP--