In 100b stubs_entry_2.s,
NSTUB(Unmount_FileSystem, 0xFFC00940)
NSTUB(Mount_FileSystem, 0xFFC00940)
NHSTUB(UnsetZoomForMovie, 0xFFC00940)
NSTUB(rewinddir, 0xFFC00940)
is obviously incorrect and NSTUB should be NHSTUB.
I can only assume CHDK does not use those functions.
You need to set to a NULLSUB address.
Ah thanks, I see what is going on now. I added in the items you mentioned to the 100a stubs_entry_2.S (and changed them to NHSTUB instead of NSTUB), tried to compile, and got this error:
========== C:\CHDK\DE\TRUNK\TRUNK695\BIN\LOGS\ERR-A1000-100A.TXT ==========
Time to generate stubs 7.21 seconds
../platform/a1000/sub/100a/libplatformsub.a(stubs_entry_2.o): In function `_qsort':
(.text+0xb0): undefined reference to `NULL_STUB'
collect2: ld returned 1 exit status
C:\CHDK\gcc451\bin\gmake.exe[1]: *** [main.elf] Error 1
gmake: *** [all-recursive] Error 1
The line in stubs_entry_2.S for qsort is basically the same for both the 100a and the 100b.
For the 100a:
NHSTUB(qsort, 0xffe2bbec)
For the 100b:
NHSTUB(qsort, 0xffe2bbec) //SDM
I don't see anything related to qsort and NULL_STUB - only the three items I just added (Unmount_FileSystem, Mount_FileSystem, and rewinddir) are NULL_STUB in stubs_entry_2.S for the 100a. I gotta get going now but I'll poke at this later. If any of you have an idea on what the problem might be please post
EDIT: I saw reyalp's post about FFC00940 being a null address so I changed "NULL_STUB" for "FFC00940" in my 100a stubs_entry_2.S file and now I get this error:
========== C:\CHDK\DE\TRUNK\TRUNK695\BIN\LOGS\ERR-A1000-100A.TXT ==========
Time to generate stubs 7.21 seconds
../platform/a1000/sub/100a/libplatformsub.a(stubs_entry_2.o): In function `_qsort':
(.text+0xb0): undefined reference to `FFC00940'
collect2: ld returned 1 exit status
C:\CHDK\gcc451\bin\gmake.exe[1]: *** [main.elf] Error 1
gmake: *** [all-recursive] Error 1
This leads me to think that it's one of the 3 NHSTUB entries that I just added for the 100a that is causing this to error out (even though it talks about '_qsort', presumably one of these 3 is called by qsort.) In the past (on other small programming-ish tweaking projects) I've missed some little thing when copy/pasting (like a tab or a space) and that breaks the world. I'm gonna fiddle with things a bit and see if perhaps the values are right I just copy/pasted them wrong.
ANOTHER EDIT: To see if I could isolate if it's just 1 of the 3 new lines I added that is breaking, I changed NHSTUB(rewinddir, FFC00940) to NHSTUB(rewinddir, NULL_STUB) and then I get this error on compiling:
========== C:\CHDK\DE\TRUNK\TRUNK695\BIN\LOGS\ERR-A1000-100A.TXT ==========
Time to generate stubs 7.21 seconds
../platform/a1000/sub/100a/libplatformsub.a(stubs_entry_2.o): In function `_qsort':
(.text+0xb0): undefined reference to `FFC00940'
../platform/a1000/sub/100a/libplatformsub.a(stubs_entry_2.o): In function `_qsort':
(.text+0xc4): undefined reference to `NULL_STUB'
collect2: ld returned 1 exit status
C:\CHDK\gcc451\bin\gmake.exe[1]: *** [main.elf] Error 1
gmake: *** [all-recursive] Error 1
So nuts, looks like either way it doesn't know what this null stub thing is
EDIT ONCE MORE, WITH FEELING: Derp! I just realized that I forgot the "0x" at the begging of "FFC00940" and also that the 100b version of stubs_entry_2.S that I was looking at had this line near the top "#define NULL_STUB 0xFFC00940". After adding that define line to my 100a file and changing the 3 references to NULL_STUB, it compiled!