<div dir="ltr">I pushed a hack to dsynth to use the second field if the first is zero, please test.<div><br></div><div>-Matt</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jan 27, 2020 at 5:05 PM Matthew Dillon <<a href="mailto:dillon@backplane.com">dillon@backplane.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hmm. that's a good point. It does look like a repeated structure. I will look into it.<div><br></div><div>-Matt</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jan 27, 2020 at 4:15 PM Romick <<a href="mailto:yellowrabbit2010@gmail.com" target="_blank">yellowrabbit2010@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I was probably lucky :) Of course, I could be wrong, but it seems to me<br>
that these pieces are not "fields" of the same structure, these are fields<br>
that belong to two records in the file. Is the order of these records<br>
guaranteed?<br>
<br>
I mean, it’s possible if I rebuild the world now, the linker will arrange<br>
these records in a different order and everything will be fine, or maybe<br>
not :)<br>
<br>
On Mon, Jan 27, 2020 at 03:56:25PM -0800, Matthew Dillon wrote:<br>
> That's ... weird. the 'zero' and the 'version' fields are transposed. Are you<br>
> compiling in any special way? I've tested -release and -master on a bunch of<br>
> boxes and they all have the version in the right spot.<br>
> <br>
> -Matt<br>
> <br>
> On Mon, Jan 27, 2020 at 1:45 PM Romick <<a href="mailto:yellowrabbit2010@gmail.com" target="_blank">yellowrabbit2010@gmail.com</a>> wrote:<br>
> <br>
> Hello,<br>
> It seems that dsynth defines the system version based on the .note.tag(s)<br>
> in<br>
> /bin/sh and a necessary condition is that these entries follow in a<br>
> certain order. On my system this is not so :)<br>
> <br>
> ==========<br>
> rabbit@fly ~% readelf -x .note.tag /bin/sh<br>
> <br>
> Hex dump of section '.note.tag':<br>
> 0x00400218 0a000000 04000000 20000000 44726167 ........ ...Drag<br>
> 0x00400228 6f6e466c 79000000 00000000 0a000000 onFly...........<br>
> 0x00400238 04000000 01000000 44726167 6f6e466c ........DragonFl<br>
> 0x00400248 79000000 e5a30700 y.......<br>
> <br>
> rabbit@fly ~%<br>
> ==========<br>
> <br>
> === /usr/src/usr.bin/dsynth/config.c ===<br>
> struct NoteTag {<br>
> Elf_Note note;<br>
> char osname1[12];<br>
> int version; /* e.g. 500702 -> 5.7 */<br>
> int x1;<br>
> int x2;<br>
> int x3;<br>
> char osname2[12];<br>
> int zero;<br>
> };<br>
> ========================================<br>
> <br>
> --<br>
> with best regards, <br>
> Yellow Rabbit @<a href="mailto:yrabbit@mastodon.sdf.org" target="_blank">yrabbit@mastodon.sdf.org</a><br>
> DragonFly 5.7-DEVELOPMENT x86_64<br>
> <br>
<br>
-- <br>
with best regards, <br>
Yellow Rabbit @<a href="mailto:yrabbit@mastodon.sdf.org" target="_blank">yrabbit@mastodon.sdf.org</a><br>
DragonFly 5.7-DEVELOPMENT x86_64<br>
</blockquote></div>
</blockquote></div>