Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

Hi, I'm having a problem getting a mod file built using gnude.

It seems to create all the object files, but at the end of the process, the BREWelf2mod utility gives me a Unknown section name ".gcc_except_table]:" error. I read through the forums, and am still kind of stumped. My project does have new, new[], delete, delete[] defined at the beginning, and is not using exception handling. The sort of odd thing is that it will make the mod file fine when not optimizing, but when optimizing is turned off, it works fine.

I'd love to hear suggestions!

-Ted

well its most likely using exceptions, check the libraries used, examine the makefile

well its most likely using exceptions, check the libraries used, examine the makefile

Hmm...found out it was a new/delete problem somewhere...
Thanks!

Hmm...found out it was a new/delete problem somewhere...
Thanks!

TedC, I'm getting similar errors when trying to convert my .elf into a .mod. Can you elaborate on what new/delete problem and how you solved it?

TedC, I'm getting similar errors when trying to convert my .elf into a .mod. Can you elaborate on what new/delete problem and how you solved it?

Sorry brobyn...havent checked the forums in a while...
Well, the main problem is that new / delete boil down to the C++ memory allocation. This is bad. To allocate memory on the phones you need to use the BREW versions of MALLOC and FREE.
One way to get around this is to override new and delete with a wrapper that calls the Brew versions...
Check your code for anything that even remotely calls new/delete or the old versions of memory allocation. (STL templates, etc...)
-Ted

Sorry brobyn...havent checked the forums in a while...
Well, the main problem is that new / delete boil down to the C++ memory allocation. This is bad. To allocate memory on the phones you need to use the BREW versions of MALLOC and FREE.
One way to get around this is to override new and delete with a wrapper that calls the Brew versions...
Check your code for anything that even remotely calls new/delete or the old versions of memory allocation. (STL templates, etc...)
-Ted

Hi,
I have the same problem.
But I overrided new() and delete() functions at begining of my code and I don't use stl... So do you have an idea of what it could be?
Germ

Hi,
I have the same problem.
But I overrided new() and delete() functions at begining of my code and I don't use stl... So do you have an idea of what it could be?
Germ

I'm having the same problem..
I have already defined new/delete operator using MALLOC and FREE..
C:\ARQUIV~1\BREWAD~1\common\bin\BREWelf2mod.exe MyApplet.elf MyApplet.mod
Unknown section name ".gcc_except_table]:"
NMAKE : fatal error U1077: 'C:\ARQUIV~1\BREWAD~1\common\bin\BREWelf2mod.exe' : return code '0x1'
Stop.
Tool returned code: 0

I'm having the same problem..
I have already defined new/delete operator using MALLOC and FREE..
C:\ARQUIV~1\BREWAD~1\common\bin\BREWelf2mod.exe MyApplet.elf MyApplet.mod
Unknown section name ".gcc_except_table]:"
NMAKE : fatal error U1077: 'C:\ARQUIV~1\BREWAD~1\common\bin\BREWelf2mod.exe' : return code '0x1'
Stop.
Tool returned code: 0

From the gcc documentation:
Quote:-fcheck-new
Check that the pointer returned by operator new is non-null before attempting to modify the storage allocated. This check is normally unnecessary because the C++ standard specifies that operator new will only return 0 if it is declared `throw()', in which case the compiler will always check the return value even without this option. In all other cases, when operator new has a non-empty exception specification, memory exhaustion is signalled by throwing std::bad_alloc. See also `new (nothrow)'.
So basically, it's probably because you havent defined your new properly.
/kufa

From the gcc documentation:
Quote:-fcheck-new
Check that the pointer returned by operator new is non-null before attempting to modify the storage allocated. This check is normally unnecessary because the C++ standard specifies that operator new will only return 0 if it is declared `throw()', in which case the compiler will always check the return value even without this option. In all other cases, when operator new has a non-empty exception specification, memory exhaustion is signalled by throwing std::bad_alloc. See also `new (nothrow)'.
So basically, it's probably because you havent defined your new properly.
/kufa

I got the same error using gnude, but the ARM compiler was a happy compiling the code (although it may not have run it, I didnt get that far).
I'm converting from java to c++ and missed this fairly obvious line:
m_lineSegments = new int[SIZE_LINE_SEGMENT];
replacing it with:
m_lineSegments = (int *)MALLOC(SIZE_LINE_SEGMENT * sizeof(int));
completely got rid of the error:
Unknown section name ".gcc_except_table]:"
So I definitely agree - check your new operators everywhere!
:)

I got the same error using gnude, but the ARM compiler was a happy compiling the code (although it may not have run it, I didnt get that far).
I'm converting from java to c++ and missed this fairly obvious line:
m_lineSegments = new int[SIZE_LINE_SEGMENT];
replacing it with:
m_lineSegments = (int *)MALLOC(SIZE_LINE_SEGMENT * sizeof(int));
completely got rid of the error:
Unknown section name ".gcc_except_table]:"
So I definitely agree - check your new operators everywhere!
:)