__dso_handle problem at link time.

OP #1173744
Hi all,

I try to use a cpp class to use fixed point math library. So far i was
able to get everything work.

Now When I call a membre function of the class, i got an

undefined reference to `__dso_handle'

i'm not an expert at the configuration of cpp under the arm7.

here the complete link command

Linking: main2.elf
arm-elf-gcc -mthumb -mcpu=arm7tdmi -mthumb-interwork -I. -gdwarf-2
-DROM_RUN -DVECTORS_IN_RAM -D__WinARM__ -D__WINARMSUBMDL_AT91SAM7S256__
-D__WINARMBOARD_ATMEL_AT91SAM7S_EK__  -O2 -Wall -Wcast-align -Wimplicit
-Wpointer-arith -Wswitch -ffunction-sections -fdata-sections
-Wredundant-decls -Wreturn-type -Wshadow -Wunused
-Wa,-adhlns=common/Cstartup.lst  -I./common -I./FixedPoint -MD -MP -MF
dep/main2.elf.d common/Cstartup.o common/swi_handler.o interrupt.o
dbgu.o syscalls.o common/Cstartup_SAM7.o flash.o
./FixedPoint/fixed.o main2.o --output main2.elf -nostartfiles
-Wl,-Map=main2.map,--cref,--gc-sections -lstdc++ -lc  -lm -lc -lgcc
-L./common  -T./common/AT91SAM7S256-ROM.ld
./FixedPoint/fixed.o: In function `fixed::sin()':
C:\Projet\Etudiant\at91sam7s_example_gamma\test_flash/FixedPoint/fixed.c 
pp:1277:
undefined reference to `__dso_handle'
collect2: ld returned 1 exit status
arm_make: *** [main2.elf] Error 1

thanx for your help.

Jonathan

Reply

A question of your own? This thread is over 18 years old. Ask it in a thread of its own – more people read along there, and it gets answered more often and sooner.

Start a new thread

A fix, an addition or feedback on this thread? Then reply here.

Formatting
  • [c]C-Code[/c]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.