Friday, November 29, 2019

Digest for comp.lang.c++@googlegroups.com - 4 updates in 3 topics

Robert Wessel <robertwessel2@yahoo.com>: Nov 29 02:46PM -0600

On Fri, 29 Nov 2019 10:42:20 -0800 (PST), Frederick Gotham
 
>Is there any way to get a list of which object files are actually needed when a program links with an archive file? If I can get such a list, I can remove the redundant object files from the project, and then go on to tweak the object files that are actually needed.
 
>I need to reduce a library of nearly a hundred source files, to about ten source files, and then go through each of these 10 source files and apply __attribute__ to every function.
 
>I posted in this group yesterday, and one of the people who replied seemed to think that I was trying to hide that I'm linking with a library licensed under GPL (as it is against the GPL license to do what I am doing if my project isn't open-source). The legal advisors in my company have confirmed that I'm allowed to do what I'm doing with this particular 3rd party library.
 
 
The list of included objects (and what symbol prompted them to be
included) from an archive is in the link map (assuming you ask for
one). -M
scott@slp53.sl.home (Scott Lurndal): Nov 29 10:04PM


>I compile this library to produce a static shared library. All of the objec=
>t files are gathered together into an archive (In Linux, this is a ".a" fil=
>e).
 
Careful with your terminology. An archive file is not a 'static shared library'.
 
Unix System V release 3 supported static shared libraries (which was a royal
pain because they all had to be statically linked at specific non-interfering
virtual addresses).
 
An archive (.a) is simply a 'folder' of object files.
 
The linker will access the archive when attempting to resolve external
symbols and will include any objects that contain such resolved external
symbols. All other objects in the archive will be ignored.
Vir Campestris <vir.campestris@invalid.invalid>: Nov 29 09:19PM

On 29/11/2019 18:58, Frederick Gotham wrote:
 
> If the Iranian government were to pay four hackers $120,000 each per year to figure out what my program is doing, I think they'd take about 5 or 6 weeks.
 
> Even if you were to give me the output of my own program, and then ask me to determine the state my program was in when it give that output, I think I would spend maybe 4-8 hours writing the program to do so.
 
> I think it would take the very best programmers-cum-hackers a few weeks to figure my program out.
 
Well, if it works ask yourself who is your competition?
 
It's not a new idea. If it works, someone must be doing it.
 
Andy
Robert Wessel <robertwessel2@yahoo.com>: Nov 29 02:42PM -0600

On Fri, 29 Nov 2019 09:23:27 +0100, David Brown
>remember that any oddities I see in MSVC may be alleviated by switches).
> But I will definitely try to remember /W4 instead of /Wall. I guess
>MSVC takes "/Wall" more literally than gcc "-Wall".
 
 
That's about true. /Wall is actually pretty much *everything* in
MSVC. /W4 is pretty much everything rational in most cases, more like
what you get with GCC's -Wall plus most of -Wextra.
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to comp.lang.c+++unsubscribe@googlegroups.com.

No comments: