>From: John Cowan <co...@ccil.org> 
>Sent: Tuesday, September 24, 2019 3:32 PM
>
>>On Tue, Sep 24, 2019 at 2:46 PM Florian Weimer <mailto:f...@deneb.enyo.de < 
>>Caution-mailto:f...@deneb.enyo.de > > wrote:
>>
>>A useful implementation for C and C++ looks rather involved due to the 
>>preprocessor. 
>
>I was thinking of something much simpler, like putting one of these, or 
>something like them, in the Makefile immediately after the link step:
>
>elftar r $@ $INCLUDE_FILES $SRC_FILES $ESSENTIAL_FILES
>
>elftar r $@ $(find ../src ../include -name '*.[ch]')
>
>Then at the other end the user runs "elftar x /usr/local/bin/foo', and its 
>source and include directories are reconstituted for them. 

This is very similar to what I was thinking, although I did find out that you 
can create a filesystem within a file (at least on linux), so in theory you can 
mount the section of the executable as a read-only filesystem.  See 
https://linuxconfig.org/how-to-create-a-file-based-filesystem-using-dd-command-on-linux
 and 
https://askubuntu.com/questions/85977/how-do-i-create-a-file-and-mount-it-as-a-filesystem
 for more details.  This would save you the step of 'elftar -x', and could also 
lead to a new standard mount point under linux where the source for a binary is 
automatically mounted ('/source' anyone?).

I also did a quick experiment to see how large a 'big' project would be.  The 
linux sources take up a little over 1 GiB uncompressed, and a little over 100 
MiB when run through 'tar -cvJf'.  It would be interesting to see how much it 
increased the size of binaries over ordinary stripped binaries on average.  If 
it was a small enough percentage, then this could be a new recommended practice.


Thanks,
Cem Karan

---
Other than quoted laws, regulations or officially published policies, the views 
expressed herein are not intended to be used as an authoritative state of the 
law nor do they reflect official positions of the U.S. Army, Department of 
Defense or U.S. Government.



_______________________________________________
License-discuss mailing list
License-discuss@lists.opensource.org
http://lists.opensource.org/mailman/listinfo/license-discuss_lists.opensource.org
              • ... Kevin P. Fleming
              • ... Bruce Perens via License-discuss
          • ... Florian Weimer
            • ... Karan, Cem F CIV USARMY CCDC ARL (USA) via License-discuss
              • ... Florian Weimer
              • ... Karan, Cem F CIV USARMY CCDC ARL (USA) via License-discuss
              • ... John Cowan
              • ... Florian Weimer
              • ... Florian Weimer
              • ... John Cowan
              • ... Karan, Cem F CIV USARMY CCDC ARL (USA) via License-discuss
              • ... Howard Chu
              • ... Karan, Cem F CIV USARMY CCDC ARL (USA) via License-discuss
              • ... Bruce Perens via License-discuss
              • ... Thorsten Glaser
              • ... Karan, Cem F CIV USARMY CCDC ARL (USA) via License-discuss
              • ... Thorsten Glaser
  • Re: [License-di... Russell McOrmond

Reply via email to