Re: How to debug null-pointer function call within __do_global_dtors_aux()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



William Tambe <tambewilliam@xxxxxxxxx> writes:
> On Tue, Aug 20, 2019 at 11:44 AM Richard Sandiford
> <richard.sandiford@xxxxxxx> wrote:
>>
>> William Tambe <tambewilliam@xxxxxxxxx> writes:
>> > I am running into an issue with both gcc-8.3.0 and gcc-9.2.0 where a
>> > null-pointer function call is being done within
>> > __do_global_dtors_aux() which is defined in crtstuff.c .
>> >
>> > I have attempted to build GCC using the following export:
>> > export CFLAGS_FOR_TARGET="-g -save-temps -fverbose-asm"
>> > but the assembly file crtstuff.s do not contain the function
>> > __do_global_dtors_aux() even-though its source file crtstuff.c has its
>> > definition.
>> >
>> > Any idea ?
>>
>> libgcc is a bit awkward in that it uses the same source file to
>> compile multiple object files.  E.g. both crtbegin.o and crtend.o
>> come from crtstuff.c, so which crtstuff.s you end up with depends
>> on the build order.
>>
>> You should see the definition if you remake crtbegin.o specifically
>> (or whichever variant you're looking at, such as crtbeginT.o).
>
> How must "make" be invoked to remake only crtbegin.o ?

Just "rm crtbegin.o ; make crtbegin.o" within the libgcc build
directory should be enough.

Richard



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux