Date: Tue, 25 Jan 2011 19:32:55 +0000 (UTC) From: "Bjoern A. Zeeb" <bzeeb-lists@lists.zabbadoz.net> To: Alexander Kabaev <kan@FreeBSD.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r217833 - head/lib/libelf Message-ID: <20110125192715.H3489@maildrop.int.zabbadoz.net> In-Reply-To: <201101251917.p0PJHoZN047195@svn.freebsd.org> References: <201101251917.p0PJHoZN047195@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 25 Jan 2011, Alexander Kabaev wrote: > Author: kan > Date: Tue Jan 25 19:17:50 2011 > New Revision: 217833 > URL: http://svn.freebsd.org/changeset/base/217833 > > Log: > Do not allocate buffer to hold data for zero-sized sections. Thanks. I understand that this will stop all the WITH_CTF barfing:) The error also had the side effect that objects ended up way biggre than they should be; about +50 to +125% depending on what you look at. .. ERROR: ctfmerge: snd_maestro.ko.debug: Cannot get sect .note.GNU-stack data: Invalid data buffer descriptor ERROR: ctfmerge: snd_maestro3.ko.debug: Cannot get sect .note.GNU-stack data: Invalid data buffer descriptor ERROR: ctfmerge: snd_neomagic.ko.debug: Cannot get sect .note.GNU-stack data: Invalid data buffer descriptor ERROR: ctfmerge: snd_sb16.ko.debug: Cannot get sect .note.GNU-stack data: Invalid data buffer descriptor ERROR: ctfmerge: snd_sb8.ko.debug: Cannot get sect .note.GNU-stack data: Invalid data buffer descriptor ERROR: ctfmerge: snd_sbc.ko.debug: Cannot get sect .note.GNU-stack data: Invalid data buffer descriptor ERROR: ctfmerge: snd_solo.ko.debug: Cannot get sect .note.GNU-stack data: Invalid data buffer descriptor .. > Modified: > head/lib/libelf/elf_data.c > > Modified: head/lib/libelf/elf_data.c > ============================================================================== > --- head/lib/libelf/elf_data.c Tue Jan 25 19:05:46 2011 (r217832) > +++ head/lib/libelf/elf_data.c Tue Jan 25 19:17:50 2011 (r217833) > @@ -115,8 +115,10 @@ elf_getdata(Elf_Scn *s, Elf_Data *d) > d->d_type = elftype; > d->d_version = e->e_version; > > - if (sh_type == SHT_NOBITS) > + if (sh_type == SHT_NOBITS || sh_size == 0) { > + STAILQ_INSERT_TAIL(&s->s_data, d, d_next); > return (d); > + } > > if ((d->d_buf = malloc(msz*count)) == NULL) { > (void) _libelf_release_data(d); > -- Bjoern A. Zeeb You have to have visions! <ks> Going to jail sucks -- <bz> All my daemons like it! http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/jails.html
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110125192715.H3489>