[Pdbg] [PATCH] libpdbg: Parse "compatible" property of fdt nodes

Amitay Isaacs amitay at ozlabs.org
Wed Feb 26 11:58:11 AEDT 2020


On Tue, 2020-02-25 at 15:46 -0600, Reza Arbab wrote:
> On Wed, 2020-02-19 at 11:17 -0600, Reza Arbab wrote:
> > Assertion failed: !target_is_virtual(node) (libpdbg/device.c:
> > pdbg_targets_init_virtual: 660)
> > Aborted
> 
> I think I figured it out.
> 
> I'm building static binaries. Don't ask. :) The hwunit registration 
> functions in libpdbg have __attribute__((constructor)). Since
> nothing 
> references those functions directly, they aren't linked into in the 
> binary and never run. Then, since no hwunits are registered, all the 
> calls to pdbg_hwunit_find_compatible() find nothing.

In pdbg Makefile, we have special flags to ensure that all the hwunits
are included in the static build.

  pdbg_LDFLAGS = -Wl,--whole-archive,-lpdbg,--no-whole-archive

Above line ensures that the whole archive is linked in pdbg binary.

> 
> And yadda yadda yadda... we fail the assert. Long story short, this
> is 
> self-inflicted. Sorry for the noise!
> 
> -- 
> Reza Arbab

Amitay.
-- 

When an archer misses the mark, he turns and looks for the fault within
himself. Failure to hit the bulls-eye is never the fault of the target. To
improve your aim - improve yourself. - Gilbert Arland



More information about the Pdbg mailing list