Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
102 user(s) are online (97 user(s) are browsing Forums)

Members: 0
Guests: 102

more...

Support us!

Headlines

 
  Register To Post  

UTF8.library compiled with G++ vs GCC
Home away from home
Home away from home


See User information
Here is way libInit can't load G++ compiled libs.


In GCC symbols ok..

libInit
init_table
lib_res
libCreateTags
verstag

LIBS:UTF8.library:     file format elf32-amigaos

SYMBOL TABLE
:
01000074 l    d  .text    00000000 .text
01005000 l    d  
.rodata    00000000 .rodata
01010000 l    d  
.sbss    00000000 .sbss
01010024 l    d  
.bss    00000000 .bss
00000000 l    d  
.comment    00000000 .comment
00000000 l    df 
*ABS*    00000000 Obtain.c
00000000 l    df 
*ABS*    00000000 Release.c
00000000 l    df 
*ABS*    00000000 UTF8Decode.c
00000000 l    df 
*ABS*    00000000 UTF8Encode.c
00000000 l    df 
*ABS*    00000000 UTF8EstimateByteSize.c
00000000 l    df 
*ABS*    00000000 UTF8GetGlyph.c
00000000 l    df 
*ABS*    00000000 UTF8GetGlyphAt.c
00000000 l    df 
*ABS*    00000000 UTF8SetGlyph.c
01005054 l     O 
.rodata    00000007 C.0.5966
00000000 l    df 
*ABS*    00000000 UTF8Length.c
00000000 l    df 
*ABS*    00000000 UTF8ToLower.c
00000000 l    df 
*ABS*    00000000 UTF8ToUpper.c
00000000 l    df 
*ABS*    00000000 UTF8SubString.c
00000000 l    df 
*ABS*    00000000 UTF8IndexOf.c
00000000 l    df 
*ABS*    00000000 UTF8GetSize.c
00000000 l    df 
*ABS*    00000000 UTF8Printf.c
01005078 l     O .rodata    00000020 C.1.10003
00000000 l    df 
*ABS*    00000000 UTF8Merge.c
00000000 l    df 
*ABS*    00000000 UTF8Left.c
00000000 l    df 
*ABS*    00000000 UTF8Right.c
00000000 l    df 
*ABS*    00000000 UTF8GetOffsetSize.c
00000000 l    df 
*ABS*    00000000 UTF8Insert.c
00000000 l    df 
*ABS*    00000000 UTF8Trim.c
00000000 l    df 
*ABS*    00000000 UTF8remove.c
00000000 l    df 
*ABS*    00000000 UTF8ModToUpper.c
00000000 l    df 
*ABS*    00000000 UTF8ModToLower.c
00000000 l    df 
*ABS*    00000000 UTF8ModLeft.c
00000000 l    df 
*ABS*    00000000 UTF8ModRight.c
00000000 l    df 
*ABS*    00000000 UTF8ModTrim.c
00000000 l    df 
*ABS*    00000000 UTF8ModSubString.c
00000000 l    df 
*ABS*    00000000 UTF8ModRemove.c
00000000 l    df 
*ABS*    00000000 UTF8ModInsert.c
00000000 l    df 
*ABS*    00000000 UTF8Copy.c
00000000 l    df 
*ABS*    00000000 UTF8cmp.c
00000000 l    df 
*ABS*    00000000 UTF8casecmp.c
00000000 l    df 
*ABS*    00000000 UTF8FindGlyph.c
00000000 l    df 
*ABS*    00000000 UTF8graphics.c
00000000 l    df 
*ABS*    00000000 init.c
01004068 l     F .text    00000024 libOpen
0100408c l     F .text    00000018 libClose
01004200 l     F 
.text    000000b8 libExpunge
010042b8 l     F 
.text    0000001c _manager_Obtain
010042d4 l     F 
.text    0000001c _manager_Release
010042f0 l     F 
.text    00000008 _UTF8_UNIMPLEMENTED
01004470 l     F 
.text    000004e8 libInit
010050ec l     O 
.rodata    0000001a lib_res
01005142 l     O 
.rodata    00000020 libCreateTags
01005108 l     O .rodata    00000039 verstag
01005164 l     O 
.rodata    0000000c libInterfaces
01005170 l     O 
.rodata    00000020 lib_managerTags
01005190 l     O .rodata    00000020 mainTags
010051b0 l     O 
.rodata    00000024 lib_manager_vectors
010051d4 l     O 
.rodata    000000b0 main_v1_vectors
01000d88 g     F 
.text    000000f4 _UTF8_UTF8SubString
01002020 g     F 
.text    00000154 _UTF8_UTF8Remove
010042f8 g     F 
.text    00000178 init_table
01000074 g     F 
.text    00000014 _UTF8_Obtain
0100009c g     F .text    000001c0 _UTF8_UTF8DecodeLen
01003128 g     F .text    000001b8 _UTF8_UTF8CaseCmp
010028f4 g     F .text    0000015c _UTF8_UTF8ModTrim
01002d34 g     F 
.text    0000017c _UTF8_UTF8ModInsert
01001164 g     F 
.text    00000074 get_format
01003f4c g     F 
.text    00000114 _UTF8_UTF8TextExtent
01000e7c g     F 
.text    0000015c _UTF8_UTF8IndexOf
01010000 g       
.sbss    00000000 _DATA_BASE_
01010020 g     O 
.sbss    00000004 IExec
01001094 g     F .text    000000d0 my_find_item
01002790 g     F .text    00000164 _UTF8_UTF8ModRight
0100198c g     F .text    00000168 _UTF8_UTF8Left
01000890 g     F .text    00000040 _UTF8_UTF8Length
01000b28 g     F 
.text    00000260 _UTF8_UTF8ToUpper
01003d44 g     F 
.text    000000e4 _UTF8_UTF8TextLength
01003c48 g     F 
.text    000000fc _UTF8_UTF8TextLengthN
01003e28 g     F 
.text    00000124 _UTF8_UTF8TextExtentN
01010024 g     O 
.bss    00000200 u8_b2
01010000 g     O 
.sbss    00000004 GraphicsBase
01010004 g     O 
.sbss    00000004 DiskfontBase
01010008 g     O .sbss    00000004 NewLibBase
0101000c g     O 
.sbss    00000004 DOSBase
01002a50 g     F 
.text    00000144 _UTF8_UTF8ModSubString
010033a8 g     F 
.text    00000270 glyph_size
01001af4 g     F 
.text    000001d4 _UTF8_UTF8Right
01002f68 g     F 
.text    000001c0 _UTF8_UTF8Cmp
01004060 g     F 
.text    00000008 _start
01018000 g       .sbss    00000000 _SDA_BASE_
01000718 g     F .text    000000e0 _UTF8_UTF8GetGlyphAt
01003b48 g     F 
.text    00000100 _UTF8_UTF8Text
01001d94 g     F 
.text    00000164 _UTF8_UTF8Insert
01010010 g     O 
.sbss    00000004 IDiskfont
01010014 g     O 
.sbss    00000004 INewlib
01003a30 g     F 
.text    00000118 _UTF8_UTF8TextN
0100064c g     F 
.text    000000cc _UTF8_UTF8GetGlyph
01010000 g       
*ABS*    00000000 __bss_start
01004958 g     F .text    00000008 memset
01002684 g     F .text    0000010c _UTF8_UTF8ModLeft
0100394c g     F .text    000000e4 _UTF8_UTF32Text
01010224 g     O 
.bss    00000200 u8_b1
01003618 g     F .text    00000334 glyph_draw
0100025c g     F 
.text    000001b4 _UTF8_UTF8Decode
010032e0 g     F 
.text    000000c8 _UTF8_UTF8FindGlyph
01000410 g     F 
.text    000001dc _UTF8_UTF8Encode
010005ec g     F 
.text    00000060 _UTF8_UTF8EstimateByteSize
00000001 g       
*ABS*    00000000 __amigaos4__
01002174 g     F 
.text    0000027c _UTF8_UTF8ModToUpper
01002b94 g     F 
.text    000001a0 _UTF8_UTF8ModRemove
0100100c g     F 
.text    00000088 my_strcmp
01010000 g       
*ABS*    00000000 _edata
01010430 g       
*ABS*    00000000 _end
01001cc8 g     F 
.text    000000cc _UTF8_UTF8GetOffsetSize
01004960 g     F .text    00000014 __NewlibCall
01001ef8 g     F 
.text    00000128 _UTF8_UTF8Trim
01000fd8 g     F 
.text    00000034 _UTF8_UTF8GetSize
010011d8 g     F 
.text    00000648 _UTF8_UTF8Printf
010023f0 g     F 
.text    00000294 _UTF8_UTF8ModToLower
01002eb0 g     F 
.text    000000b8 _UTF8_UTF8Copy
01010018 g     O .sbss    00000004 IDOS
0101001c g     O 
.sbss    00000004 IGraphics
010008d0 g     F .text    00000258 _UTF8_UTF8ToLower
010040a4 g     F 
.text    0000015c close_libs
010007f8 g     F 
.text    00000098 _UTF8_UTF8SetGlyph
01000088 g     F .text    00000014 _UTF8_Release
01001820 g     F .text    0000016c _UTF8_UTF8Merge


in G++ symbols you have junk...

_ZL7libInitP7LibraryPvP9Interface
_Z10init_tablev
_ZL7lib_res
_ZL13libCreateTags
_ZL7verstag

UTF8.library:     file format elf32-amigaos

SYMBOL TABLE
:
01000074 l    d  .text    00000000 .text
01006000 l    d  
.rodata    00000000 .rodata
0100645c l    d  
.eh_frame    00000000 .eh_frame
0101645c l    d  
.data    00000000 .data
0101645c l    d  
.sbss    00000000 .sbss
01016480 l    d  .bss    00000000 .bss
00000000 l    d  
.comment    00000000 .comment
00000000 l    d  
.gnu.attributes    00000000 .gnu.attributes
00000000 l    df 
*ABS*    00000000 Obtain.c
00000000 l    df 
*ABS*    00000000 Release.c
00000000 l    df 
*ABS*    00000000 UTF8Decode.c
00000000 l    df 
*ABS*    00000000 UTF8Encode.c
00000000 l    df 
*ABS*    00000000 UTF8EstimateByteSize.c
00000000 l    df 
*ABS*    00000000 UTF8GetGlyph.c
00000000 l    df 
*ABS*    00000000 UTF8GetGlyphAt.c
00000000 l    df 
*ABS*    00000000 UTF8SetGlyph.c
00000000 l    df 
*ABS*    00000000 UTF8Length.c
00000000 l    df 
*ABS*    00000000 UTF8ToLower.c
00000000 l    df 
*ABS*    00000000 UTF8ToUpper.c
00000000 l    df 
*ABS*    00000000 UTF8SubString.c
00000000 l    df 
*ABS*    00000000 UTF8IndexOf.c
00000000 l    df 
*ABS*    00000000 UTF8GetSize.c
00000000 l    df 
*ABS*    00000000 UTF8Printf.c
00000000 l    df 
*ABS*    00000000 UTF8Merge.c
00000000 l    df 
*ABS*    00000000 UTF8Left.c
00000000 l    df 
*ABS*    00000000 UTF8Right.c
00000000 l    df 
*ABS*    00000000 UTF8GetOffsetSize.c
00000000 l    df 
*ABS*    00000000 UTF8Insert.c
00000000 l    df 
*ABS*    00000000 UTF8Trim.c
00000000 l    df 
*ABS*    00000000 UTF8remove.c
00000000 l    df 
*ABS*    00000000 UTF8ModToUpper.c
00000000 l    df 
*ABS*    00000000 UTF8ModToLower.c
00000000 l    df 
*ABS*    00000000 UTF8ModLeft.c
00000000 l    df 
*ABS*    00000000 UTF8ModRight.c
00000000 l    df 
*ABS*    00000000 UTF8ModTrim.c
00000000 l    df 
*ABS*    00000000 UTF8ModSubString.c
00000000 l    df 
*ABS*    00000000 UTF8ModRemove.c
00000000 l    df 
*ABS*    00000000 UTF8ModInsert.c
00000000 l    df 
*ABS*    00000000 UTF8Copy.c
00000000 l    df 
*ABS*    00000000 UTF8cmp.c
00000000 l    df 
*ABS*    00000000 UTF8casecmp.c
00000000 l    df 
*ABS*    00000000 UTF8FindGlyph.c
00000000 l    df 
*ABS*    00000000 UTF8graphics.c
00000000 l    df 
*ABS*    00000000 init.c
01005188 l     F .text    00000024 _ZL7libOpenP23LibraryManagerInterfacem
010051ac l     F 
.text    00000018 _ZL8libCloseP23LibraryManagerInterface
010051c4 l     F 
.text    00000018 _ZL15_manager_ObtainP23LibraryManagerInterface
010051dc l     F 
.text    00000018 _ZL16_manager_ReleaseP23LibraryManagerInterface
010051f4 l     F 
.text    00000008 _ZL19_UTF8_UNIMPLEMENTEDP9UTF8IFace
010051fc l     F 
.text    00000148 _Z10close_libsP8_Library.constprop.0
01005344 l     F 
.text    000000a8 _ZL10libExpungeP23LibraryManagerInterface
01005634 l     F 
.text    000003c0 _ZL7libInitP7LibraryPvP9Interface
010060e4 l     O 
.rodata    0000001a _ZL7lib_res
010060fe l     O 
.rodata    00000020 _ZL13libCreateTags
01006120 l     O 
.rodata    0000000c _ZL13libInterfaces
010061fc l     O 
.rodata    00000020 _ZL15lib_managerTags
0100612c l     O 
.rodata    00000020 _ZL8mainTags
0100614c l     O 
.rodata    000000b0 _ZL15main_v1_vectors
0100621c l     O 
.rodata    00000024 _ZL19lib_manager_vectors
01006240 l     O 
.rodata    00000025 _ZL7verstag
00000000 l    df 
*ABS*    00000000 
01000088 g     F .text    00000014 _Z13_UTF8_ReleaseP9UTF8IFace
01001e10 g     F 
.text    000000a0 _Z23_UTF8_UTF8GetOffsetSizeP9UTF8IFacePhi
01002a84 g     F 
.text    00000154 _Z17_UTF8_UTF8ModTrimP9UTF8IFacePPhm
01001ff8 g     F 
.text    00000124 _Z14_UTF8_UTF8TrimP9UTF8IFacePhm
01002930 g     F .text    00000154 _Z18_UTF8_UTF8ModRightP9UTF8IFacePPhim
01000968 g     F .text    0000027c _Z17_UTF8_UTF8ToLowerP9UTF8IFacePhS1_m
010006e4 g     F 
.text    000000d0 _Z18_UTF8_UTF8GetGlyphP9UTF8IFacePhPi
01001ae0 g     F 
.text    00000150 _Z14_UTF8_UTF8LeftP9UTF8IFacePhim
01000888 g     F .text    00000094 _Z18_UTF8_UTF8SetGlyphP9UTF8IFacemPh
0101645c g       
.data    00000000 _DATA_BASE_
01001eb0 g     F 
.text    00000148 _Z16_UTF8_UTF8InsertP9UTF8IFacePhiS1_m
01003030 g     F 
.text    000000dc _Z14_UTF8_UTF8CopyP9UTF8IFacePhm
01002e9c g     F 
.text    00000194 _Z19_UTF8_UTF8ModInsertP9UTF8IFacePPhiS1_m
0101647c g     O 
.sbss    00000004 IExec
01001128 g     F .text    0000004c _Z17_UTF8_UTF8GetSizeP9UTF8IFacePh
0100459c g     F .text    000003fc _Z14_UTF8_UTF8TextP9UTF8IFaceP8RastPortP11OutlineFontfiiPh
01000684 g     F .text    00000060 _Z26_UTF8_UTF8EstimateByteSizeP9UTF8IFacem
010053f4 g     F 
.text    00000148 _Z10close_libsP8_Library
0100553c g     F 
.text    000000f8 _Z10init_tablev
010042f8 g     F 
.text    000002a4 _Z21_UTF8_UTF8TextLengthNP9UTF8IFaceP11OutlineFontfPhi
01000fac g     F 
.text    0000017c _Z17_UTF8_UTF8IndexOfP9UTF8IFacePhS1_
01002bd8 g     F 
.text    00000138 _Z22_UTF8_UTF8ModSubStringP9UTF8IFacePPhiim
010037cc g     F 
.text    00000300 _Z10glyph_drawP9UTF8IFaceP8RastPortP11OutlineFontfmmm
0100406c g     F 
.text    0000028c _Z20_UTF8_UTF8TextLengthP9UTF8IFaceP11OutlineFontfPh
01001980 g     F .text    00000160 _Z15_UTF8_UTF8MergeP9UTF8IFacemz
01016680 g     O .bss    00000200 u8_b2
01016460 g     O 
.sbss    00000004 GraphicsBase
0101645c g     O 
.sbss    00000004 DiskfontBase
01016464 g     O 
.sbss    00000004 NewLibBase
01016468 g     O .sbss    00000004 DOSBase
0100091c g     F .text    0000004c _Z16_UTF8_UTF8LengthP9UTF8IFacePh
01000074 g     F 
.text    00000014 _Z12_UTF8_ObtainP9UTF8IFace
01004998 g     F .text    00000414 _Z15_UTF8_UTF8TextNP9UTF8IFaceP8RastPortP11OutlineFontfiiPhi
00000000         
*UND*    00000000 _start
01016880 g       .bss    00000000 __end
0100048c g     F .text    000001f8 _Z16_UTF8_UTF8EncodeP9UTF8IFacePmPcm
01003d88 g     F 
.text    000002e4 _Z21_UTF8_UTF8TextExtentNP9UTF8IFaceP11OutlineFontfPhiP10TextExtent
0101e45c g       
.data    00000000 _SDA_BASE_
010012d0 g     F 
.text    00000070 _Z10get_formatPcS_
01001174 g     F 
.text    000000a0 _Z9my_strcmpPcS_
0101646c g     O 
.sbss    00000004 IDiskfont
0100280c g     F .text    00000124 _Z17_UTF8_UTF8ModLeftP9UTF8IFacePPhim
01016474 g     O 
.sbss    00000004 INewlib
01001340 g     F 
.text    00000640 _Z16_UTF8_UTF8PrintfP9UTF8IFacePmPhz
0101645c g       
.data    00000000 __bss_start
010059f4 g     F .text    00000008 memset
0100009c g     F .text    000001ec _Z16_UTF8_UTF8DecodeP9UTF8IFacePmPhm
01003308 g     F .text    000001f4 _Z17_UTF8_UTF8CaseCmpP9UTF8IFacePhS1_S1_
01016480 g     O .bss    00000200 u8_b1
01001214 g     F 
.text    000000bc _Z12my_find_itemPPKcPc
01002544 g     F 
.text    000002c8 _Z20_UTF8_UTF8ModToLowerP9UTF8IFacePhPS1_m
01002d10 g     F 
.text    0000018c _Z19_UTF8_UTF8ModRemoveP9UTF8IFacePPhiim
010053ec g     F 
.text    00000008 _Z6_startv
01000e7c g     F 
.text    00000130 _Z19_UTF8_UTF8SubStringP9UTF8IFacePhiim
010035b4 g     F 
.text    00000218 _Z10glyph_sizeP9UTF8IFaceP11OutlineFontfmPiS3_S3_
01003acc g     F 
.text    000002bc _Z20_UTF8_UTF8TextExtentP9UTF8IFaceP11OutlineFontfPhP10TextExtent
00000001 g       
*ABS*    00000000 __amigaos4__
010034fc g     F 
.text    000000b8 _Z19_UTF8_UTF8FindGlyphP9UTF8IFacePhm
010007b4 g     F 
.text    000000d4 _Z20_UTF8_UTF8GetGlyphAtP9UTF8IFacePhiPi
0101645c g       
.data    00000000 _edata
01016880 g       .bss    00000000 _end
01004dac g     F 
.text    000003dc _Z15_UTF8_UTF32TextP9UTF8IFaceP8RastPortP11OutlineFontfiiPm
010059fc g     F .text    00000014 __NewlibCall
010022a8 g     F 
.text    0000029c _Z20_UTF8_UTF8ModToUpperP9UTF8IFacePhPS1_m
01001c30 g     F 
.text    000001e0 _Z15_UTF8_UTF8RightP9UTF8IFacePhim
01000288 g     F .text    00000204 _Z19_UTF8_UTF8DecodeLenP9UTF8IFacePmPhmm
0100211c g     F 
.text    0000018c _Z16_UTF8_UTF8RemoveP9UTF8IFacePhiim
01000be4 g     F 
.text    00000298 _Z17_UTF8_UTF8ToUpperP9UTF8IFacePhS1_m
01016478 g     O .sbss    00000004 IDOS
0100310c g     F 
.text    000001fc _Z13_UTF8_UTF8CmpP9UTF8IFacePhS1_S1_
01016470 g     O 
.sbss    00000004 IGraphics

(NutsAboutAmiga)

Basilisk II for AmigaOS4
AmigaInputAnywhere
Excalibur
and other tools and apps.
Go to top
Re: UTF8.library compiled with G++ vs GCC
Home away from home
Home away from home


See User information
@LiveForIt

extern “C” did not work on its own.
you also need to remove “STATIC CONST”
then G++ stopped adding junk to the symbols.

The problem is that idltool adds “STATIC CONST” to a lot of stuff.

(NutsAboutAmiga)

Basilisk II for AmigaOS4
AmigaInputAnywhere
Excalibur
and other tools and apps.
Go to top
Re: UTF8.library compiled with G++ vs GCC
Just can't stay away
Just can't stay away


See User information
@LiveForIt
To get the original names of C++ functions and remove the "junk" you can use "c++filt symbol_name", for example "c++filt _ZL7libInitP7LibraryPvP9Interface".
Doesn't help for building libraries/devices using C++ code, but for example when you get a crash and have to demanding the names in a GrimReaper stack trace.

Go to top
Re: UTF8.library compiled with G++ vs GCC
Just can't stay away
Just can't stay away


See User information
@LiveForIt

https://en.wikipedia.org/wiki/Name_mangling

If I understand your problem correctly, I might try a solution that uses gcc to compile the required Amiga parts (C API) and g++ to compile the normal C++ code. And link using g++.

But you need to provide extern "C" glue to call C++ from C. It's normal.

Go to top
Re: UTF8.library compiled with G++ vs GCC
Home away from home
Home away from home


See User information
@Capehill

Actually, I don’t know what the problem is, I think lib_res symbol has to be correct, even if I define it as extern “C”, it does not work. ramlib fails to read the library and load it into memory.

(NutsAboutAmiga)

Basilisk II for AmigaOS4
AmigaInputAnywhere
Excalibur
and other tools and apps.
Go to top
Re: UTF8.library compiled with G++ vs GCC
Just can't stay away
Just can't stay away


See User information
@Capehill
Quote:
If I understand your problem correctly, I might try a solution that uses gcc to compile the required Amiga parts (C API) and g++ to compile the normal C++ code. And link using g++.
There should be no difference between compiling for example
struct Resident lib_res =
{
   ...
}
with gcc and compiling
extern "C"
{
   
struct Resident lib_res =
   {
      ...
   }
}
with g++.

Same for functions/function prototypes.

Go to top
Re: UTF8.library compiled with G++ vs GCC
Home away from home
Home away from home


See User information
@joerg

it works now???

https://github.com/khval/utf8_library/ ... 049298356478c657f1e89fa4c

Not sure way it did not work before..

(NutsAboutAmiga)

Basilisk II for AmigaOS4
AmigaInputAnywhere
Excalibur
and other tools and apps.
Go to top
Re: UTF8.library compiled with G++ vs GCC
Just can't stay away
Just can't stay away


See User information
@LiveForIt

OT: Please double-check your _memset function, looks like it's setting the same address size times.

Go to top
Re: UTF8.library compiled with G++ vs GCC
Just can't stay away
Just can't stay away


See User information
@Capehill
Quote:
OT: Please double-check your _memset function, looks like it's setting the same address size times.
That's wrong and should be
for (ptrsizesize --) *ptr++ = n;
instead, and there is something else which can't work either:
INewlib = (NewLibIFace*) IExec->GetInterfaceNULL /*NewLibBase*/,"main"1NULL);
But maybe that's the reason for now using an own (but wrong) _memset() function instead of the newlib.library bzero()?

Go to top
Re: UTF8.library compiled with G++ vs GCC
Home away from home
Home away from home


See User information
@joerg

Yeh.. might med a few bugs there just to make it compile.


Edited by LiveForIt on 2023/4/22 21:02:59
(NutsAboutAmiga)

Basilisk II for AmigaOS4
AmigaInputAnywhere
Excalibur
and other tools and apps.
Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project