<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/syslinux.git/com32/lib/sys/module/elf_module.c, branch master</title>
<subtitle>git.kernel.org: pub/scm/boot/syslinux/syslinux.git
</subtitle>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/syslinux.git/'/>
<entry>
<title>module: convert to dprintf() to aid debugging</title>
<updated>2013-07-26T15:35:59+00:00</updated>
<author>
<name>Matt Fleming</name>
<email>matt.fleming@intel.com</email>
</author>
<published>2013-07-26T15:35:59+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/syslinux.git/commit/?id=0006a5e1bc8742fbbc6fbe52d1d12bab05eef311'/>
<id>0006a5e1bc8742fbbc6fbe52d1d12bab05eef311</id>
<content type='text'>
dprintf() is much more useful than DBG_PRINT() when trying to figure out
where a module is failing to load because we can enable the debug
statements at runtime.

Signed-off-by: Matt Fleming &lt;matt.fleming@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
dprintf() is much more useful than DBG_PRINT() when trying to figure out
where a module is failing to load because we can enable the debug
statements at runtime.

Signed-off-by: Matt Fleming &lt;matt.fleming@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge tag 'syslinux-5.01' into firmware</title>
<updated>2013-01-29T15:11:28+00:00</updated>
<author>
<name>Matt Fleming</name>
<email>matt.fleming@intel.com</email>
</author>
<published>2013-01-29T14:01:07+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/syslinux.git/commit/?id=bf20364b582c383b4927f898de213b1cc0981a80'/>
<id>bf20364b582c383b4927f898de213b1cc0981a80</id>
<content type='text'>
Conflicts:
	Makefile
	NEWS
	com32/cmenu/Makefile
	com32/elflink/ldlinux/Makefile
	com32/gfxboot/Makefile
	com32/gpllib/Makefile
	com32/include/sys/module.h
	com32/lib/Makefile
	com32/lib/sys/module/elf_module.c
	com32/menu/Makefile
	com32/rosh/Makefile
	com32/samples/Makefile
	core/init.c
	mk/elf.mk

Signed-off-by: Matt Fleming &lt;matt.fleming@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Conflicts:
	Makefile
	NEWS
	com32/cmenu/Makefile
	com32/elflink/ldlinux/Makefile
	com32/gfxboot/Makefile
	com32/gpllib/Makefile
	com32/include/sys/module.h
	com32/lib/Makefile
	com32/lib/sys/module/elf_module.c
	com32/menu/Makefile
	com32/rosh/Makefile
	com32/samples/Makefile
	core/init.c
	mk/elf.mk

Signed-off-by: Matt Fleming &lt;matt.fleming@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>module: Replace cur_module with module_current()</title>
<updated>2013-01-23T15:05:29+00:00</updated>
<author>
<name>Matt Fleming</name>
<email>matt.fleming@intel.com</email>
</author>
<published>2013-01-23T14:46:08+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/syslinux.git/commit/?id=7c42c59ebd9d33efe3a5f12542580a8c1379447d'/>
<id>7c42c59ebd9d33efe3a5f12542580a8c1379447d</id>
<content type='text'>
It's easy for cur_module and prev_module to get out of sync with
reality (the actual module that is running), so add module_current()
which returns the module at the head of the module_list, i.e. the
module that was loaded most recently. Better still, by using the list
we don't have to do any kind of stacking of module pointers ourselves.

This fixes a bug where cur_module contained a stale pointer (the
module had actually been unloaded) but the pointer value had since
been reallocated for a new module in spawn_load(), meaning that the
following check,

    if (!strcmp(cur_module-&gt;name, module-&gt;name))

was always going to be true, even though *no* module was actually
loaded at this point as we were reloading ldlinux.c32 from
start_ldlinux(). This could have been fixed with a NULL-assignment
after module_unload(), but using the modules_head list to detect the
current module is much cleaner.

Note that the core module loaded in load_env32() is always on the
list, therefore module_current() will always return a valid pointer.

Signed-off-by: Matt Fleming &lt;matt.fleming@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It's easy for cur_module and prev_module to get out of sync with
reality (the actual module that is running), so add module_current()
which returns the module at the head of the module_list, i.e. the
module that was loaded most recently. Better still, by using the list
we don't have to do any kind of stacking of module pointers ourselves.

This fixes a bug where cur_module contained a stale pointer (the
module had actually been unloaded) but the pointer value had since
been reallocated for a new module in spawn_load(), meaning that the
following check,

    if (!strcmp(cur_module-&gt;name, module-&gt;name))

was always going to be true, even though *no* module was actually
loaded at this point as we were reloading ldlinux.c32 from
start_ldlinux(). This could have been fixed with a NULL-assignment
after module_unload(), but using the modules_head list to detect the
current module is much cleaner.

Note that the core module loaded in load_env32() is always on the
list, therefore module_current() will always return a valid pointer.

Signed-off-by: Matt Fleming &lt;matt.fleming@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>module: Check for NULL ctors and dtors</title>
<updated>2013-01-23T15:05:28+00:00</updated>
<author>
<name>Matt Fleming</name>
<email>matt.fleming@intel.com</email>
</author>
<published>2013-01-23T13:40:24+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/syslinux.git/commit/?id=4027dbf9df88e3feaa3744c6622e4ae7cf8ecd6e'/>
<id>4027dbf9df88e3feaa3744c6622e4ae7cf8ecd6e</id>
<content type='text'>
Don't dereference a NULL ctor/dtor as that can cause us to crash.

Signed-off-by: Matt Fleming &lt;matt.fleming@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Don't dereference a NULL ctor/dtor as that can cause us to crash.

Signed-off-by: Matt Fleming &lt;matt.fleming@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>module: Check the return value of malloc()</title>
<updated>2013-01-23T15:05:28+00:00</updated>
<author>
<name>Matt Fleming</name>
<email>matt.fleming@intel.com</email>
</author>
<published>2013-01-17T14:50:29+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/syslinux.git/commit/?id=cd079794e8908b9402840cde322bbd32ae08523c'/>
<id>cd079794e8908b9402840cde322bbd32ae08523c</id>
<content type='text'>
Instead of blindly writing through a possible-NULL pointer, check the
return value of malloc().

Signed-off-by: Matt Fleming &lt;matt.fleming@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Instead of blindly writing through a possible-NULL pointer, check the
return value of malloc().

Signed-off-by: Matt Fleming &lt;matt.fleming@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge tag 'syslinux-5.00' into firmware</title>
<updated>2012-12-07T11:33:45+00:00</updated>
<author>
<name>Matt Fleming</name>
<email>matt.fleming@intel.com</email>
</author>
<published>2012-12-07T11:33:45+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/syslinux.git/commit/?id=10f6cf6eef0a7da7dad1933efdbfb101155792d0'/>
<id>10f6cf6eef0a7da7dad1933efdbfb101155792d0</id>
<content type='text'>
Conflicts:
	Makefile
	com32/elflink/ldlinux/Makefile
	com32/lib/sys/module/elf_module.c
	core/cleanup.c
	core/comboot.inc
	core/conio.c
	core/fs/fs.c
	core/init.c
	core/mem/free.c
	core/mem/malloc.c
	core/timer.inc
	diag/geodsp/Makefile
	extlinux/main.c
	mk/embedded.mk
	modules/Makefile

Signed-off-by: Matt Fleming &lt;matt.fleming@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Conflicts:
	Makefile
	com32/elflink/ldlinux/Makefile
	com32/lib/sys/module/elf_module.c
	core/cleanup.c
	core/comboot.inc
	core/conio.c
	core/fs/fs.c
	core/init.c
	core/mem/free.c
	core/mem/malloc.c
	core/timer.inc
	diag/geodsp/Makefile
	extlinux/main.c
	mk/embedded.mk
	modules/Makefile

Signed-off-by: Matt Fleming &lt;matt.fleming@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>module: Fix incorrect list_entry() use</title>
<updated>2012-11-30T10:46:45+00:00</updated>
<author>
<name>Matt Fleming</name>
<email>matt.fleming@intel.com</email>
</author>
<published>2012-11-29T22:40:46+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/syslinux.git/commit/?id=4bd9ed23c51beb53f5fb650992ed20328876c411'/>
<id>4bd9ed23c51beb53f5fb650992ed20328876c411</id>
<content type='text'>
Correct the bogus use of list_entry() that was introduced in commit
8f1c64acf9c6 ("module: Stop silently failing to load dependency
modules").

Signed-off-by: Matt Fleming &lt;matt.fleming@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Correct the bogus use of list_entry() that was introduced in commit
8f1c64acf9c6 ("module: Stop silently failing to load dependency
modules").

Signed-off-by: Matt Fleming &lt;matt.fleming@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>module: Stop silently failing to load dependency modules</title>
<updated>2012-11-29T13:30:16+00:00</updated>
<author>
<name>Matt Fleming</name>
<email>matt.fleming@intel.com</email>
</author>
<published>2012-11-29T11:35:28+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/syslinux.git/commit/?id=8f1c64acf9c60d184fef37f373737895468c0771'/>
<id>8f1c64acf9c60d184fef37f373737895468c0771</id>
<content type='text'>
We should be checking the return value of spawn_load() when loading a
module's dependencies and printing some kind of an error message if
they fail to load (for instance if the file is missing) and returning
an error to the caller.

Track the most recently loaded module in 'head' before we begin
loading dependencies. That way we can unload any dependencies in the
error path that were successfully loaded.

Signed-off-by: Matt Fleming &lt;matt.fleming@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We should be checking the return value of spawn_load() when loading a
module's dependencies and printing some kind of an error message if
they fail to load (for instance if the file is missing) and returning
an error to the caller.

Track the most recently loaded module in 'head' before we begin
loading dependencies. That way we can unload any dependencies in the
error path that were successfully loaded.

Signed-off-by: Matt Fleming &lt;matt.fleming@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>module: Correct the size of the module symbol table</title>
<updated>2012-11-27T11:58:58+00:00</updated>
<author>
<name>Matt Fleming</name>
<email>matt.fleming@intel.com</email>
</author>
<published>2012-11-27T11:58:58+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/syslinux.git/commit/?id=b2eadc35e99caa2a6aba2fae99031c1073bc6cf5'/>
<id>b2eadc35e99caa2a6aba2fae99031c1073bc6cf5</id>
<content type='text'>
We were incorrectly grovelling around in the GNU hash table for the
size of the symbol table. Instead we need to map the section headers
and search for the SHT_DYNSYM entry.

This bug caused hdt.c32 to refuse to load as some symbols were never
resolved because not all of the SHT_UNDEF symbols in hdt.c32 were
processed.

Signed-off-by: Matt Fleming &lt;matt.fleming@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We were incorrectly grovelling around in the GNU hash table for the
size of the symbol table. Instead we need to map the section headers
and search for the SHT_DYNSYM entry.

This bug caused hdt.c32 to refuse to load as some symbols were never
resolved because not all of the SHT_UNDEF symbols in hdt.c32 were
processed.

Signed-off-by: Matt Fleming &lt;matt.fleming@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>module: Define __{ctors,dtors}_end symbols</title>
<updated>2012-08-22T10:42:19+00:00</updated>
<author>
<name>Chandramouli Narayanan</name>
<email>chandramouli.narayanan@intel.com</email>
</author>
<published>2012-08-22T10:37:50+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/syslinux.git/commit/?id=48b044fc7fc2c0ebb53c3963e9dc75629ae30414'/>
<id>48b044fc7fc2c0ebb53c3963e9dc75629ae30414</id>
<content type='text'>
This patch fixes linker script for module initialization.  The old
__module_*_ptr symbols are no longer used, instead we now have an
array of constructors and destructors.

Signed-off-by: Chandramouli Narayanan &lt;chandramouli.narayanan@intel.com&gt;
Signed-off-by: Matt Fleming &lt;matt.fleming@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch fixes linker script for module initialization.  The old
__module_*_ptr symbols are no longer used, instead we now have an
array of constructors and destructors.

Signed-off-by: Chandramouli Narayanan &lt;chandramouli.narayanan@intel.com&gt;
Signed-off-by: Matt Fleming &lt;matt.fleming@intel.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
