remove HAL_MODULE_INFO_SYM const

HAL_MODULE_INFO_SYM was declared as read-only, but
the struct is written to by libhardware.  This causes
a segfault when -Wl,-z,relro is enabled.

Fixed.

Change-Id: I3a3e8366bc2468aef75a3480edd0b3e8fcfeafa5
This commit is contained in:
Nick Kralevich
2012-03-01 17:06:37 -08:00
parent ee93a5bce0
commit c7f0d89684
3 changed files with 3 additions and 3 deletions

View File

@@ -930,7 +930,7 @@ static struct hw_module_methods_t gps_module_methods = {
.open = open_gps .open = open_gps
}; };
const struct hw_module_t HAL_MODULE_INFO_SYM = { struct hw_module_t HAL_MODULE_INFO_SYM = {
.tag = HARDWARE_MODULE_TAG, .tag = HARDWARE_MODULE_TAG,
.version_major = 1, .version_major = 1,
.version_minor = 0, .version_minor = 0,

View File

@@ -202,7 +202,7 @@ static struct hw_module_methods_t lights_module_methods = {
/* /*
* The emulator lights Module * The emulator lights Module
*/ */
const struct hw_module_t HAL_MODULE_INFO_SYM = { struct hw_module_t HAL_MODULE_INFO_SYM = {
.tag = HARDWARE_MODULE_TAG, .tag = HARDWARE_MODULE_TAG,
.version_major = 1, .version_major = 1,
.version_minor = 0, .version_minor = 0,

View File

@@ -623,7 +623,7 @@ static struct hw_module_methods_t sensors_module_methods = {
.open = open_sensors .open = open_sensors
}; };
const struct sensors_module_t HAL_MODULE_INFO_SYM = { struct sensors_module_t HAL_MODULE_INFO_SYM = {
.common = { .common = {
.tag = HARDWARE_MODULE_TAG, .tag = HARDWARE_MODULE_TAG,
.version_major = 1, .version_major = 1,