Re: [PATCH] libexec/ld.so/dlfcn.c - fix column alignment
Ping. On Mon, Jan 01, 2018 at 06:17:53PM GMT, Raf Czlonka wrote: > On Mon, Jan 01, 2018 at 08:56:18AM GMT, Mark Kettenis wrote: > > > Date: Mon, 1 Jan 2018 07:49:54 +0100 (CET) > > > From: Mark Kettenis > > > > > > > Date: Mon, 1 Jan 2018 04:20:35 + > > > > From: Raf Czlonka > > > > > > > > Hi all, > > > > > > > > With the recent rtld -> ld.so name change in the 1.100 revision[0], > > > > said objtypename has been increased by one character, thus causing > > > > everything past the 'Type' column to become mis-aligned, i.e.: > > > > > > > > $ ldd /usr/bin/ldd > > > > > > > > /usr/bin/ldd: > > > > StartEnd Type Open Ref GrpRef Name > > > > 105b6710 105b67303000 exe 10 0 > > > > /usr/bin/ldd > > > > 105d9e966000 105d9ec46000 rlib 01 0 > > > > /usr/lib/libc.so.92.2 > > > > 105dca30 105dca30 ld.so 01 0 > > > > /usr/libexec/ld.so > > > > > > > > How about simply changing the ld.so five-character name to ldso > > > > four-character one and keep current column alignment? > > > > > > > > Alternatively, expand the 'Type' column and all remaining objtypenames > > > > by one character (mostly space) in order to fix the alignment. > > > > > > > > I'm only including the diff for the latter as doing the former is > > > > trivial - I still prefer the former solution, BTW. > > > > > > > > While there, how about dropping the leading tab character so that > > > > majority of the outputs generated fit within 80 columns? > > > > > > I'd prefer to simply revert the change. It serves no purpose other > > > than to eat another column. And if there is any doubt this is ld.so, > > > the full name is printed next to it on the same line! > > > > Or we could change it to "ldso" instead. > > Hi Mark, > > Yes, please - as per above, and quoting myself from a private email, > this would have been my preferred solution as removing a single > character - the dot (.) - is simply the least amount of effort to > fix the alignment while still maintaining the ldso objtypename > unambiguously clear and descriptive. > > Additionally, the 'Type' column header would look better separated > from the other headers - bar Start and End - by a single space. > > Kind regards, > > Raf
Re: [PATCH] libexec/ld.so/dlfcn.c - fix column alignment
On Mon, Jan 01, 2018 at 08:56:18AM GMT, Mark Kettenis wrote: > > Date: Mon, 1 Jan 2018 07:49:54 +0100 (CET) > > From: Mark Kettenis > > > > > Date: Mon, 1 Jan 2018 04:20:35 + > > > From: Raf Czlonka > > > > > > Hi all, > > > > > > With the recent rtld -> ld.so name change in the 1.100 revision[0], > > > said objtypename has been increased by one character, thus causing > > > everything past the 'Type' column to become mis-aligned, i.e.: > > > > > > $ ldd /usr/bin/ldd > > > > > > /usr/bin/ldd: > > > StartEnd Type Open Ref GrpRef Name > > > 105b6710 105b67303000 exe 10 0 /usr/bin/ldd > > > 105d9e966000 105d9ec46000 rlib 01 0 > > > /usr/lib/libc.so.92.2 > > > 105dca30 105dca30 ld.so 01 0 > > > /usr/libexec/ld.so > > > > > > How about simply changing the ld.so five-character name to ldso > > > four-character one and keep current column alignment? > > > > > > Alternatively, expand the 'Type' column and all remaining objtypenames > > > by one character (mostly space) in order to fix the alignment. > > > > > > I'm only including the diff for the latter as doing the former is > > > trivial - I still prefer the former solution, BTW. > > > > > > While there, how about dropping the leading tab character so that > > > majority of the outputs generated fit within 80 columns? > > > > I'd prefer to simply revert the change. It serves no purpose other > > than to eat another column. And if there is any doubt this is ld.so, > > the full name is printed next to it on the same line! > > Or we could change it to "ldso" instead. Hi Mark, Yes, please - as per above, and quoting myself from a private email, this would have been my preferred solution as removing a single character - the dot (.) - is simply the least amount of effort to fix the alignment while still maintaining the ldso objtypename unambiguously clear and descriptive. Additionally, the 'Type' column header would look better separated from the other headers - bar Start and End - by a single space. Kind regards, Raf
Re: [PATCH] libexec/ld.so/dlfcn.c - fix column alignment
> Date: Mon, 1 Jan 2018 07:49:54 +0100 (CET) > From: Mark Kettenis > > > Date: Mon, 1 Jan 2018 04:20:35 + > > From: Raf Czlonka > > > > Hi all, > > > > With the recent rtld -> ld.so name change in the 1.100 revision[0], > > said objtypename has been increased by one character, thus causing > > everything past the 'Type' column to become mis-aligned, i.e.: > > > > $ ldd /usr/bin/ldd > > > > /usr/bin/ldd: > > StartEnd Type Open Ref GrpRef Name > > 105b6710 105b67303000 exe 10 0 /usr/bin/ldd > > 105d9e966000 105d9ec46000 rlib 01 0 > > /usr/lib/libc.so.92.2 > > 105dca30 105dca30 ld.so 01 0 > > /usr/libexec/ld.so > > > > How about simply changing the ld.so five-character name to ldso > > four-character one and keep current column alignment? > > > > Alternatively, expand the 'Type' column and all remaining objtypenames > > by one character (mostly space) in order to fix the alignment. > > > > I'm only including the diff for the latter as doing the former is > > trivial - I still prefer the former solution, BTW. > > > > While there, how about dropping the leading tab character so that > > majority of the outputs generated fit within 80 columns? > > I'd prefer to simply revert the change. It serves no purpose other > than to eat another column. And if there is any doubt this is ld.so, > the full name is printed next to it on the same line! Or we could change it to "ldso" instead.
Re: [PATCH] libexec/ld.so/dlfcn.c - fix column alignment
> Date: Mon, 1 Jan 2018 04:20:35 + > From: Raf Czlonka > > Hi all, > > With the recent rtld -> ld.so name change in the 1.100 revision[0], > said objtypename has been increased by one character, thus causing > everything past the 'Type' column to become mis-aligned, i.e.: > > $ ldd /usr/bin/ldd > > /usr/bin/ldd: > StartEnd Type Open Ref GrpRef Name > 105b6710 105b67303000 exe 10 0 /usr/bin/ldd > 105d9e966000 105d9ec46000 rlib 01 0 > /usr/lib/libc.so.92.2 > 105dca30 105dca30 ld.so 01 0 > /usr/libexec/ld.so > > How about simply changing the ld.so five-character name to ldso > four-character one and keep current column alignment? > > Alternatively, expand the 'Type' column and all remaining objtypenames > by one character (mostly space) in order to fix the alignment. > > I'm only including the diff for the latter as doing the former is > trivial - I still prefer the former solution, BTW. > > While there, how about dropping the leading tab character so that > majority of the outputs generated fit within 80 columns? I'd prefer to simply revert the change. It serves no purpose other than to eat another column. And if there is any doubt this is ld.so, the full name is printed next to it on the same line!
[PATCH] libexec/ld.so/dlfcn.c - fix column alignment
Hi all, With the recent rtld -> ld.so name change in the 1.100 revision[0], said objtypename has been increased by one character, thus causing everything past the 'Type' column to become mis-aligned, i.e.: $ ldd /usr/bin/ldd /usr/bin/ldd: StartEnd Type Open Ref GrpRef Name 105b6710 105b67303000 exe 10 0 /usr/bin/ldd 105d9e966000 105d9ec46000 rlib 01 0 /usr/lib/libc.so.92.2 105dca30 105dca30 ld.so 01 0 /usr/libexec/ld.so How about simply changing the ld.so five-character name to ldso four-character one and keep current column alignment? Alternatively, expand the 'Type' column and all remaining objtypenames by one character (mostly space) in order to fix the alignment. I'm only including the diff for the latter as doing the former is trivial - I still prefer the former solution, BTW. While there, how about dropping the leading tab character so that majority of the outputs generated fit within 80 columns? Regards and Happy New Year, Raf [0] https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/libexec/ld.so/dlfcn.c.diff?r1=1.99&r2=1.100 Index: libexec/ld.so/dlfcn.c === RCS file: /cvs/src/libexec/ld.so/dlfcn.c,v retrieving revision 1.100 diff -u -p -r1.100 dlfcn.c --- libexec/ld.so/dlfcn.c 8 Dec 2017 05:25:20 - 1.100 +++ libexec/ld.so/dlfcn.c 1 Jan 2018 04:05:16 - @@ -495,7 +495,7 @@ _dl_show_objects(void) "\t%x %e %t %O%r %g %p\n"; if (_dl_tracefmt1 == NULL && _dl_tracefmt2 == NULL) - _dl_dprintf(outputfd, "\tStart %s End %s Type Open Ref GrpRef Name\n", + _dl_dprintf(outputfd, "\tStart %s End %s Type Open Ref GrpRef Name\n", pad, pad); if (_dl_tracelib) { @@ -512,16 +512,16 @@ _dl_show_objects(void) objtypename = "ld.so"; break; case OBJTYPE_EXE: - objtypename = "exe "; + objtypename = "exe "; break; case OBJTYPE_LIB: - objtypename = "rlib"; + objtypename = "rlib "; break; case OBJTYPE_DLO: - objtypename = "dlib"; + objtypename = "dlib "; break; default: - objtypename = ""; + objtypename = "?"; break; } _dl_tracefmt(outputfd, object, fmt1, fmt2, objtypename);