Skip to main content

Posts

Showing posts from September, 2017

Building Open Source Software and the GNU Standard C Library (Lab 4 Part 1)

An amazing development in the GNU Project is cflow, a control flow charting software for C programs. I built the software on Matrix (Linux server) under normal priveleges and the steps were very simple, all are documentted below: 1) transfer the package to the server via sftp after downloading the most recent tar.gz file. 2) Extract the package using tar -xvzf (package name) in its current directory 3) cd into the new directory 4) Run ./configure [here the makefile is being configured based on found settings] 5) Run make [the dependancies for cflow are being created] 6) cd src 7) Run the command using cflow (filename), I tested this with cflow's main.cpp. The results are here . I found the process very simple and interesting, it did take some exploring to find where to run the command however. In the next part I will be builidng and testing the lastest version of the GNU Standard C Library.            

Comparing Compiler Options and Output Files (Lab 2)

Depending on the way a file is compiled, it will have different run time speeds, file sizes, and Assembly code. This is explained below in 7 different compilations of a C program:    **All images will be hosted here [click the Assembly Code Pictures.docx green text to download] to make this post lighter on the planet, every picture reference will be made by figure followed by a number.** 1: gcc lab2.c -g (debugging) -O0 (no optimization) -fno-builtin (no builit in function optimization) When exploring the Assembly version of this code we use objdump -d lab2.c which tells us a few things. Firstly, the code I wrote is in the section <main> in figure 1 . Secondly, the statement to which I am calling (a simple "Hello World!" printf statement) is displayed in figure 2 . Lastly, with objdump -h we can see there are 30 section headers and using ls-1h we can see the file is approximately 72 kb. 2:  gcc lab2.c -static -g -O0 -fno-builtin Without explaining -static,

Comparing Open Source Software Packages (Lab 1)

This post examines code review processes to understand how and where to look to push code upstream OpenLDAP This software is best described on the application's project overview page as a " robust, commercial-grade, fully featured, and open source LDAP suite of applications and development tools ". ( https://www.openldap.org/project/ )   This software operates under it's own OpenLDAP public license and accepts patches through the OpenLDAP Issue Tracking System . Patches are approved by the OpenLDAP Core Team , most noticeably Howard Chu and Kurt Zeilenga. An example of a closed patch is Contribution# 5410 where a developer Peter O'Gorman added a patch to allow building of a module with a different compiler addressed to Howard Chu (Chief Architect). The issue was concluded over nine days after two replies to the original message.  Change was implemented and the developer was very prompt (three hours after Architect reply) to respond. The Issue Tracker