Search found 40 matches

by Dwedit
Tue Oct 04, 2011 5:27 pm
Forum: devkitARM
Topic: Linker is adding extra crap (Unreferenced library code)
Replies: 15
Views: 16837

Re: Linker is adding extra crap (Unreferenced library code)

tueidj wrote:I say leave it as is. If I want an exception when I divide by zero then I should get one. If someone else doesn't, they can write their own long division function.
The division by zero handler it uses is completely blank, and can't possibly throw any exceptions.
by Dwedit
Tue Oct 04, 2011 2:04 am
Forum: devkitARM
Topic: Linker is adding extra crap (Unreferenced library code)
Replies: 15
Views: 16837

Re: Linker is adding extra crap (Unreferenced library code)

Here, I'm doing a 64-bit unsigned division. This is a call to the function __aeabi_uldivmod. So it depends on these functions: __aeabi_uldivmod from _aeabi_uldivmod.o __aeabi_ldiv0 from _dvmd_tls.o (this appears to be a blank function, the only content is "bx lr", it's probably the division by 0 han...
by Dwedit
Sun Oct 02, 2011 2:08 am
Forum: devkitARM
Topic: Linker is adding extra crap (Unreferenced library code)
Replies: 15
Views: 16837

Re: Linker is adding extra crap (Unreferenced library code)

I have now tried that, but it didn't work. My makefile line now looks like LDFLAGS = -g $(ARCH) -Wl,-Map,$(notdir [email protected]).map,--gc-sections EDIT: When I look through "libgcc.a", I see this odd symbol table stuff in "bpabi.o". There are references to "aeabi_unwind_cpp_pr0", but they do not appear in the ...
by Dwedit
Sat Oct 01, 2011 10:32 pm
Forum: Off Topic
Topic: NO$GBA hates the "push sp" instruction, libgcc uses it
Replies: 5
Views: 9492

Re: NO$GBA hates the "push sp" instruction, libgcc uses it

I have confirmed that including this ASM code makes 64-bit division compatible with NO$GBA: .text .align .pool .global __aeabi_ldivmod .global __aeabi_uldivmod __aeabi_ldivmod: cmp r3, #0 cmpeq r2, #0 bne 0f cmp r1, #0 cmpeq r0, #0 movlt r1, #-2147483648 @ 0x80000000 movlt r0, #0 mvngt r1, #-2147483...
by Dwedit
Sat Oct 01, 2011 10:14 pm
Forum: devkitARM
Topic: Linker is adding extra crap (Unreferenced library code)
Replies: 15
Views: 16837

Re: Linker is adding extra unreferenced library code

I'm sorry, it's just that these posts usually come immediately after I've been trying for about 4 hours to frantically figure out what's going on, and I'm really frustrated at the time I'm posting them. I just really don't understand how code that isn't referenced anywhere ends up in the program. Wh...
by Dwedit
Fri Sep 30, 2011 6:54 pm
Forum: Bug Reports
Topic: Libgba: gba_compression.h doesn't have const source pointer
Replies: 3
Views: 5213

Re: Libgba: gba_compression.h doesn't have const source poin

I'm used to getting compiler errors when you try to promote a const u32* to a plain u32*. Is this a non-standard extension of GCC that a const pointer can be promoted to a non-const void pointer, or is it perfectly legal?
I do get warnings when it happens.
by Dwedit
Fri Sep 30, 2011 8:33 am
Forum: devkitARM
Topic: Linker is adding extra crap (Unreferenced library code)
Replies: 15
Views: 16837

Linker is adding extra crap (Unreferenced library code)

I'm having problems with unnecessary code getting linked into my project. I can't figure out where these symbols are coming from: abort _Unwind_decode_target2 __aeabi_unwind_cpp_pr0 restore_core_regs __gnu_unwind_execute __libc_init_array After I disassemble my .elf file with objdump, I can't find a...
by Dwedit
Fri Sep 30, 2011 6:20 am
Forum: Bug Reports
Topic: Libgba: gba_compression.h doesn't have const source pointer
Replies: 3
Views: 5213

Libgba: gba_compression.h doesn't have const source pointer

I was just looking through gba_compression.h, and I noticed that none of the system calls declared the "source" pointer as const. They are just plain void* pointers. Also, the Vram functions should probably indicate that the destination pointer is a unsigned short pointer. //------------------------...
by Dwedit
Sat Jul 30, 2011 5:48 pm
Forum: Off Topic
Topic: NO$GBA hates the "push sp" instruction, libgcc uses it
Replies: 5
Views: 9492

Re: NO$GBA hates the "push sp" instruction, LibGCC uses it

Development stopped in Feb 2008, he even stopped shipping the product to people who wanted to pay for it, and disappeared from the face of the internet. Rumor has it that Nintendo bought it out and turned it into their debugger, but that's just a rumor. And if I wanted to hack the EXE to try to fix ...
by Dwedit
Fri Jul 29, 2011 8:02 am
Forum: Off Topic
Topic: NO$GBA hates the "push sp" instruction, libgcc uses it
Replies: 5
Views: 9492

Re: NO$GBA hates the "push sp" instruction, LibGCC uses it

To clarify, this post concerns the libgcc THUMB library that is included in devkitARM, specifically the file "C:\devkitpro\devkitARM\lib\gcc\arm-eabi\4.5.1\thumb\libgcc.a".
edit: I have just confirmed that the problem also happens in version 4.6.1 as well.