Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
No results found
Show changes
Commits on Source (3)
Showing
with 7 additions and 8647 deletions
......@@ -41,8 +41,12 @@
#include <algorithm>
#include <memory>
#pragma GCC diagnostic ignored "-Wsign-compare"
#include "elfio/elfio.hpp"
#include "elfio/elfio_dump.hpp"
#include "elf.h"
#pragma GCC diagnostic pop
#include <zipr-sdk>
#include <zipr_options.h>
......
......@@ -367,26 +367,6 @@ class ZiprImpl_t : public Zipr_t
std::string AddCallbacksToNewSegment(const std::string& tmpname, RangeAddress_t end_of_new_space);
RangeAddress_t FindCallbackAddress(RangeAddress_t end_of_new_space,RangeAddress_t start_addr, const std::string &callback);
#if 0
IRDB_SDK::Instruction_t *FindPinnedInsnAtAddr(RangeAddress_t addr);
// bool ShouldPinImmediately(IRDB_SDK::Instruction_t *upinsn);
// bool IsPinFreeZone(RangeAddress_t addr, int size);
// routines to deal with a "68 sled"
// int Calc68SledSize(RangeAddress_t addr, size_t sled_overhead=6);
// RangeAddress_t Do68Sled(RangeAddress_t addr);
// void Update68Sled(Sled_t, Sled_t &);
// IRDB_SDK::Instruction_t* Emit68Sled(Sled_t sled);
// IRDB_SDK::Instruction_t* Emit68Sled(RangeAddress_t addr, Sled_t sled, IRDB_SDK::Instruction_t* next_sled);
/*
* The goal here is to simply clear out chain entries
* that may be in the way. This will not clear out
* previously added PUSHs.
*/
// void Clear68SledArea(Sled_t sled);
// void InsertJumpPoints68SledArea(Sled_t &sled);
#endif
// support
RangeAddress_t extend_section(ELFIO::section *sec,ELFIO::section *next_sec);
......@@ -412,15 +392,12 @@ class ZiprImpl_t : public Zipr_t
// structures necessary for ZIPR algorithm.
// std::set<UnresolvedUnpinned_t> unresolved_unpinned_addrs;
// std::set<UnresolvedPinned_t,pin_sorter_t> unresolved_pinned_addrs;
std::multimap<UnresolvedUnpinned_t,Patch_t> patch_list;
// a manager for all dollops
ZiprDollopManager_t m_dollop_mgr;
// final mapping of instruction to address.
// std::map<IRDB_SDK::Instruction_t*,RangeAddress_t>
Zipr_SDK::InstructionLocationMap_t final_insn_locations;
std::map<RangeAddress_t,UnresolvedUnpinnedPatch_t> m_PatchAtAddrs;
......
......@@ -40,7 +40,7 @@ files= '''
# ELFIO needs to be first so we get the zipr version instead of the sectrans version. the zipr version is modified to include get_offset.
cpppath='''
.
$ZIPR_HOME/third_party/ELFIO/elfio-2.2
$SECURITY_TRANSFORMS_HOME/third_party/elfio-code
$IRDB_SDK//include/
$ZIPR_HOME/include/
$ZIPR_SDK/include/
......
......@@ -881,7 +881,7 @@ void ElfWriterImpl<T_Elf_Ehdr,T_Elf_Phdr,T_Elf_Addr,T_Elf_Shdr,T_Elf_Sym, T_Elf_
T_Elf_Shdr null_shdr;
memset(&null_shdr,0,sizeof(null_shdr));
null_shdr.sh_type=SHT_nullptr;
null_shdr.sh_type=SHT_NULL;
null_shdr. sh_name =strtab.location(null_symtab);
shdrs.push_back(null_shdr);
......
......@@ -63,7 +63,6 @@ inline uintptr_t page_round_down(uintptr_t x)
return ( (((uintptr_t)(x)) - (PAGE_SIZE-1)) & (~(PAGE_SIZE-1)) );
}
int find_magic_segment_index(ELFIO::elfio *elfiop);
template < typename T > std::string to_hex_string( const T& n )
{
......@@ -179,45 +178,6 @@ void ZiprImpl_t::registerOptions()
m_variant->setRequired(true);
#if 0
m_add_sections.setDescription("Enable writing of section headers using elfwriter.");
m_bss_opts.setDescription("Enable/Disable optimizing BSS segments so they aren't written to the binary.");
m_verbose.setDescription("Enable verbose output");
m_apply_nop.setDescription("Apply NOP to patches that fallthrough.");
m_variant.setDescription("Variant ID.");
m_output_filename.setDescription("Output file name.");
m_architecture.setDescription("Override default system "
"architecture detection");
m_replop.setDescription("Replop all dollops.");
m_objcopy.setDescription("Set the path of objcopy to use.");
m_callbacks.setDescription("Set the path of the file "
"which contains any required callbacks.");
m_seed.setDescription("Seed the random number generator with this value.");
m_dollop_map_filename.setDescription("Specify filename to save dollop map.");
m_paddable_minimum_distance.setDescription("Specify the minimum size of a gap to be filled.");
// our pid is a fine default value -- had issues with time(nullptr) as two copies of zipr from
// were getting the same time(nullptr) return value since we invoked them in parallel.
m_seed.setValue((int)getpid());
zipr_namespace->addOption(&m_output_filename);
zipr_namespace->addOption(&m_callbacks);
zipr_namespace->addOption(&m_architecture);
zipr_namespace->addOption(&m_replop);
zipr_namespace->addOption(&m_objcopy);
zipr_namespace->addOption(&m_seed);
zipr_namespace->addOption(&m_dollop_map_filename);
zipr_namespace->addOption(&m_paddable_minimum_distance);
global->addOption(&m_variant);
global->addOption(&m_verbose);
global->addOption(&m_vverbose);
global->addOption(&m_apply_nop);
global->addOption(&m_add_sections);
global->addOption(&m_bss_opts);
return zipr_namespace;
#endif
memory_space.registerOptions(&m_zipr_options);
}
......@@ -1556,17 +1516,6 @@ size_t ZiprImpl_t::DetermineDollopEntrySize(Zipr_SDK::DollopEntry_t *entry, bool
if (*m_verbose)
{
#if 0
cout << "Adding opening size of " << opening_size << "." << endl;
cout << "Adding closing size of " << closing_size << "." << endl;
cout << "WCDES of " << std::hex << entry << ":"
<< std::dec << wcis+opening_size+closing_size << endl;
#else
// if we need these, please add additional levels of verbose logging!
// this log line accounts for 80% of a 744mb log file.
//cout << "Open/close/wcdes for "<<hex<<entry<<": " << dec << opening_size
// <<"/" << closing_size << "/" << wcis+opening_size+closing_size << endl;
#endif
}
return wcis+opening_size+closing_size;
......@@ -1949,174 +1898,9 @@ DataScoop_t* ZiprImpl_t::FindScoop(const RangeAddress_t &addr)
return find_it==m_firp->getDataScoops().end() ? nullptr : *find_it;
}
void ZiprImpl_t::WriteScoop(section* sec, FILE* fexe)
{
// skip any nobits/tls sections.
if ( (sec->get_flags() & SHF_TLS) == SHF_TLS && sec->get_type() == SHT_NOBITS )
return;
RangeAddress_t start=sec->get_address();
RangeAddress_t end=sec->get_size()+start;
for(RangeAddress_t i=start;i<end;i++)
{
DataScoop_t* scoop=FindScoop(i);
if(!scoop)
continue;
const string &the_contents=scoop->getContents();
char b=the_contents[i-scoop->getStart()->getVirtualOffset()];
if( sec->get_type() == SHT_NOBITS )
{
assert(b==0); // cannot write non-zero's to NOBITS sections.
// and we can't do the write, because the sec. isn't in the binary.
continue;
}
int file_off=sec->get_offset()+i-start;
fseek(fexe, file_off, SEEK_SET);
fwrite(&b,1,1,fexe);
if(i-start<200)// keep verbose output short enough.
{
if (*m_verbose)
printf("Writing scoop byte %#2x at %p, fileoffset=%x\n",
((unsigned)b)&0xff, (void*)i, file_off);
}
}
}
static bool InScoop(VirtualOffset_t addr, DataScoop_t* scoop)
{
if(scoop->getStart()->getVirtualOffset()==0)
return false;
// check before
if(addr < scoop->getStart()->getVirtualOffset())
return false;
if(scoop->getEnd()->getVirtualOffset()<addr)
return false;
return true;
}
void ZiprImpl_t::FillSection(section* sec, FILE* fexe)
{
RangeAddress_t start=sec->get_address();
RangeAddress_t end=sec->get_size()+start;
DataScoop_t* scoop=nullptr;
if (*m_verbose)
printf("Dumping addrs %p-%p\n", (void*)start, (void*)end);
for(RangeAddress_t i=start;i<end;i++)
{
if(scoop==nullptr || InScoop(i,scoop))
{
scoop=FindScoop(i);
}
if(!memory_space.IsByteFree(i))
{
// get byte and write it into exe.
char b=memory_space[i];
int file_off=sec->get_offset()+i-start;
fseek(fexe, file_off, SEEK_SET);
fwrite(&b,1,1,fexe);
if(i-start<200)// keep verbose output short enough.
{
if (*m_verbose)
printf("Writing byte %#2x at %p, fileoffset=%x\n",
((unsigned)b)&0xff, (void*)i, file_off);
}
}
}
}
void ZiprImpl_t::OutputBinaryFile(const string &name)
{
assert(elfiop);
#ifdef support_stratafier_mode
// ELFIO::dump::section_headers(cout,*elfiop);
string callback_file_name;
ELFIO::elfio *rewrite_headers_elfiop = new ELFIO::elfio;
ELFIO::Elf_Half total_sections;
/*
* Unfortunately, we need to have a special
* "pass" to rewrite section header lengths.
* Elfio does not work properly otherwise.
*/
rewrite_headers_elfiop->load(name);
total_sections = rewrite_headers_elfiop->sections.size();
for ( ELFIO::Elf_Half i = 0; i < total_sections; ++i )
{
section* sec = rewrite_headers_elfiop->sections[i];
assert(sec);
if( (sec->get_flags() & SHF_ALLOC) == 0 )
continue;
if( (sec->get_flags() & SHF_EXECINSTR) == 0)
continue;
#ifdef EXTEND_SECTIONS
section* next_sec = nullptr;
if ((i+1)<total_sections)
{
next_sec = rewrite_headers_elfiop->sections[i+1];
}
extend_section(sec, next_sec);
#endif //EXTEND_SECTIONS
}
rewrite_headers_elfiop->save(name);
string myfn=name;
#ifdef CGC
if(!use_stratafier_mode)
myfn+=".stripped";
#endif //CGC
printf("Opening %s\n", myfn.c_str());
FILE* fexe=fopen(myfn.c_str(),"r+");
assert(fexe);
// For all sections
ELFIO::Elf_Half n = elfiop->sections.size();
for ( ELFIO::Elf_Half i = 0; i < n; ++i )
{
section* sec = elfiop->sections[i];
assert(sec);
if( (sec->get_flags() & SHF_ALLOC) == 0 )
continue;
if( (sec->get_flags() & SHF_EXECINSTR) == 0)
WriteScoop(sec, fexe);
else
FillSection(sec, fexe);
}
fclose(fexe);
string tmpname=name+string(".to_insert");
printf("Opening %s\n", tmpname.c_str());
FILE* to_insert=fopen(tmpname.c_str(),"w");
if(!to_insert)
perror( "void ZiprImpl_t::OutputBinaryFile(const string &name)");
#endif //support_stratafier_mode
#ifdef support_stratafier_mode
fclose(to_insert);
callback_file_name = AddCallbacksToNewSegment(tmpname,end_of_new_space);
InsertNewSegmentIntoExe(name,callback_file_name,start_of_new_space);
#endif
// now that the textra scoop has been crated and setup, we have the info we need to
// re-generate the eh information.
RelayoutEhInfo();
......@@ -2160,264 +1944,6 @@ void ZiprImpl_t::PrintStats()
dump_instruction_map();
}
int find_magic_segment_index(ELFIO::elfio *elfiop)
{
ELFIO::Elf_Half n = elfiop->segments.size();
ELFIO::Elf_Half i=0;
ELFIO::segment* last_seg=nullptr;
int last_seg_index=-1;
for ( i = 0; i < n; ++i )
{
ELFIO::segment* seg = elfiop->segments[i];
assert(seg);
if(seg->get_type() != PT_LOAD)
continue;
if(last_seg && (last_seg->get_virtual_address() + last_seg->get_memory_size()) > (seg->get_virtual_address() + seg->get_memory_size()))
continue;
if(seg->get_file_size()==0)
continue;
last_seg=seg;
last_seg_index=i;
}
cout<<"Found magic Seg #"<<std::dec<<last_seg_index<<" has file offset "<<last_seg->get_offset()<<endl;
return last_seg_index;
}
void ZiprImpl_t::InsertNewSegmentIntoExe(string rewritten_file, string bin_to_add, RangeAddress_t sec_start)
{
// from stratafy.pl
// #system("objcopy --add-section .strata=strata.linked.data.$$ --change-section-address .strata=$maxaddr --set-section-flags .strata=alloc --set-start $textoffset $exe_copy $newfile") == 0 or die ("command failed $? \n") ;
// system("$stratafier/add_strata_segment $newfile $exe_copy ") == 0 or die (" command failed : $? \n");
string chmod_cmd="";
if(use_stratafier_mode)
{
string objcopy_cmd = "", stratafier_cmd = "", sstrip_cmd;
//objcopy_cmd= m_opts.getObjcopyPath() + string(" --add-section .strata=")+bin_to_add+" "+
objcopy_cmd= string(*m_objcopy) + string(" --add-section .strata=")+bin_to_add+" "+
string("--change-section-address .strata=")+to_string(sec_start)+" "+
string("--set-section-flags .strata=alloc,code ")+" "+
// --set-start $textoffset // set-start not needed, as we aren't changing the entry point.
rewritten_file; // editing file in place, no $newfile needed.
printf("Attempting: %s\n", objcopy_cmd.c_str());
if(-1 == system(objcopy_cmd.c_str()))
{
perror(__FUNCTION__);
}
if ( elfiop->get_type() == ET_EXEC )
stratafier_cmd="$STRATAFIER/add_strata_segment";
else
// move_segheaders is needed for shared objects.
stratafier_cmd="$STRATAFIER/move_segheaders";
if (*m_architecture == 64) {
stratafier_cmd += "64";
}
stratafier_cmd += " " + rewritten_file+ " " + rewritten_file +".addseg"+" .strata";
printf("Attempting: %s\n", stratafier_cmd.c_str());
if(-1 == system(stratafier_cmd.c_str()))
{
perror(__FUNCTION__);
}
#ifdef CGC
sstrip_cmd=string("")+getenv("SECURITY_TRANSFORMS_HOME")+"/third_party/ELFkickers-3.0a/sstrip/sstrip "+rewritten_file+".addseg";
printf("Attempting: %s\n", sstrip_cmd.c_str());
if(-1 == system(sstrip_cmd.c_str()))
{
perror(__FUNCTION__);
}
#endif
}
else
{
#ifndef CGC
assert(0); // "not stratafier" mode available only for CGC
#elif support_stratafier_mode
string cmd="";
string zeroes_file=rewritten_file+".zeroes";
cout<<"Note: bss_needed=="<<std::dec<<bss_needed<<endl;
cmd="cat /dev/zero | head -c "+to_string(bss_needed)+" > "+zeroes_file;
printf("Attempting: %s\n", cmd.c_str());
if(-1 == system(cmd.c_str()))
{
perror(__FUNCTION__);
}
cmd="cat "+rewritten_file+".stripped "+zeroes_file+" "+bin_to_add+" > "+rewritten_file+".addseg";
printf("Attempting: %s\n", cmd.c_str());
if(-1 == system(cmd.c_str()))
{
perror(__FUNCTION__);
}
std::ifstream::pos_type orig_size=filesize((rewritten_file+".stripped").c_str());
std::ifstream::pos_type incr_size=bss_needed+filesize(bin_to_add.c_str());
assert(orig_size+incr_size=filesize((rewritten_file+".addseg").c_str()));
std::ifstream::pos_type total_size=orig_size+incr_size;
ELFIO::elfio *boutaddseg=new ELFIO::elfio;
boutaddseg->load(rewritten_file+".addseg");
ELFIO::dump::header(cout,*boutaddseg);
ELFIO::dump::segment_headers(cout,*boutaddseg);
cout<<"Segments offset is "<<boutaddseg->get_segments_offset()<<endl;
ELFIO::Elf_Half i=find_magic_segment_index(boutaddseg);
FILE* fboutaddseg=fopen((rewritten_file+".addseg").c_str(),"r+");
assert(fboutaddseg);
ELFIO::Elf32_Phdr myphdr;
int file_off=boutaddseg->get_segments_offset()+sizeof(ELFIO::Elf32_Phdr)*(i);
cout<<"Seeking to "<<std::hex<<file_off<<endl;
fseek(fboutaddseg, file_off, SEEK_SET);
fread(&myphdr, sizeof(myphdr), 1, fboutaddseg);
cout<<"My phdr has vaddr="<<std::hex<<myphdr.p_vaddr<<endl;
cout<<"My phdr has phys addr="<<std::hex<<myphdr.p_paddr<<endl;
cout<<"My phdr has file size="<<std::hex<<myphdr.p_filesz<<endl;
myphdr.p_filesz=(int)((int)total_size-(int)myphdr.p_offset);
myphdr.p_memsz=myphdr.p_filesz;
myphdr.p_flags|=PF_X|PF_R|PF_W;
cout<<"Updated file size="<<std::hex<<myphdr.p_filesz<<endl;
fseek(fboutaddseg, file_off, SEEK_SET);
fwrite(&myphdr, sizeof(myphdr), 1, fboutaddseg);
fclose(fboutaddseg);
ELFIO::Elf32_Shdr myseg_header;
#endif // #elif support_stratafier_mode from #ifndef CGC
}
chmod_cmd=string("chmod +x ")+rewritten_file+".addseg";
printf("Attempting: %s\n", chmod_cmd.c_str());
if(-1 == system(chmod_cmd.c_str()))
{
perror(__FUNCTION__);
}
}
/*
FIXME
*/
static RangeAddress_t getCallbackStartAddr()
{
// add option later, or write code to fix this
const RangeAddress_t callback_start_addr=0x8048000;
return 0;
return callback_start_addr;
}
string ZiprImpl_t::AddCallbacksToNewSegment(const string& tmpname, RangeAddress_t end_of_new_space)
{
const RangeAddress_t callback_start_addr=getCallbackStartAddr();
//if(m_opts.getCallbackFileName() == "" )
if((string)(*m_callbacks) == "" )
return tmpname;
string tmpname2=tmpname+"2";
string tmpname3=tmpname+"3";
printf("Setting strata library at: %p\n", (void*)end_of_new_space);
printf("Strata symbols are at %p+addr(symbol)\n", (void*)(end_of_new_space-callback_start_addr));
#if 0
string cmd= string("$STRATAFIER/strata_to_data ")+
m_opts.getCallbackFileName()+string(" ")+tmpname2+" "+to_hex_string(callback_start_addr);
#else
/*
objcopy -O binary /home/jdh8d/umbrella/uvadev.peasoup/zipr_install/bin/callbacks.exe b.out.to_insert2
*/
//string cmd= m_opts.getObjcopyPath() + string(" -O binary ")+ m_opts.getCallbackFileName()+string(" ")+tmpname2;
string cmd= string(*m_objcopy) + string(" -O binary ")+string(*m_callbacks)+string(" ")+tmpname2;
#endif
printf("Attempting: %s\n", cmd.c_str());
if(-1 == system(cmd.c_str()))
{
perror(__FUNCTION__);
return tmpname;
}
cmd="cat "+tmpname+" "+tmpname2+" > "+tmpname3;
printf("Attempting: %s\n", cmd.c_str());
if(-1 == system(cmd.c_str()))
{
perror(__FUNCTION__);
return tmpname;
}
return tmpname3;
}
// horrible code, rewrite in C++ please!
static RangeAddress_t getSymbolAddress(const string &symbolFilename, const string &symbol) throw(exception)
{
string symbolFullName = symbolFilename + "+" + symbol;
// nm -a stratafier.o.exe | egrep " integer_overflow_detector$" | cut -f1 -d' '
string command = "nm -a " + symbolFilename + " | egrep \" " + symbol + "$\" | cut -f1 -d' '";
char address[1024]="";
cerr<<"Attempting: "<<command<<endl;
FILE *fp = popen(command.c_str(), "r");
int res=fscanf(fp,"%s", address);
cerr<<"Looking for "<<symbol<<". Address string is "<<address<<endl;
string addressString = string(address);
pclose(fp);
RangeAddress_t ret= (uintptr_t) strtoull(addressString.c_str(),nullptr,16);
//TODO: throw exception if address is not found.
//for now assert the address string isn't empty
if(addressString.empty() || res==0)
{
cerr<<"Cannot find symbol "<< symbol << " in " << symbolFilename << "."<<endl;
addressString="0x0";
return 0;
}
else
{
cerr<<"Found symbol "<< symbol << " in " << symbolFilename << " at " << std::hex << ret << "."<<endl;
return ret;
}
}
RangeAddress_t ZiprImpl_t::FindCallbackAddress(RangeAddress_t end_of_new_space, RangeAddress_t start_addr, const string &callback)
{
if(callback_addrs.find(callback)==callback_addrs.end())
{
//RangeAddress_t addr=getSymbolAddress(m_opts.getCallbackFileName(),callback);
RangeAddress_t addr=getSymbolAddress(*m_callbacks,callback);
if(addr!=0)
{
/* adjust by start of new location, - beginning of old location */
addr=addr+end_of_new_space-start_addr;
}
cout<<" Addr adjusted to "<<std::hex<<addr<<endl;
callback_addrs[callback]=addr;
}
return callback_addrs[callback];
}
void ZiprImpl_t::UpdateCallbacks()
{
// first byte of this range is the last used byte.
......
......@@ -41,7 +41,7 @@ DollopFiles= '''
# ELFIO needs to be first so we get the zipr version instead of the sectrans version. the zipr version is modified to include get_offset.
cpppath='''
.
$ZIPR_HOME/third_party/ELFIO/elfio-2.2
$SECURITY_TRANSFORMS_HOME/third_party/elfio-code/
$IRDB_SDK/include/
$ZIPR_HOME/include/
$ZIPR_SDK/include/
......
ELFIO library implemented by
Serge Lamikhov-Center <to_serge@users.sourceforge.net>
MIT License
Copyright (C) 2001-2011 by Serge Lamikhov-Center
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
ELFIO is a header-only C++ library - installation does not require any
(pre)compilation step. Just copy 'elfio' folder into standard include directory.
For example:
cp -R elfio /usr/include
Alternatively, it is possible to modify compiler's include search path -
'-I<dir>' option in GCC; '/I<dir>' in MSVC.
Makefile(s) that come with the distribution package are provided for
example files compilation only.
To compile the examples, use the commands below:
./configure
make
This diff is collapsed.
SUBDIRS = examples
nobase_include_HEADERS = elfio/elf_types.hpp elfio/elfio_dynamic.hpp \
elfio/elfio.hpp elfio/elfio_header.hpp \
elfio/elfio_note.hpp elfio/elfio_relocation.hpp \
elfio/elfio_section.hpp elfio/elfio_segment.hpp \
elfio/elfio_strings.hpp elfio/elfio_symbols.hpp \
elfio/elfio_utils.hpp elfio/elfio_dump.hpp
EXTRA_DIST = doc/site/elfio.pdf
dist-hook:
mv $(distdir)/doc/site/elfio.pdf $(distdir)/doc
rm -Rf $(distdir)/doc/site
This diff is collapsed.
ELFIO is a header-only C++ library intended for reading and generating
files in the ELF binary format. It is used as a standalone library - it is not
dependant on any other product or project. Adhering to ISO C++, it compiles on
a wide variety of architectures and compilers.
This diff is collapsed.
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by ELFIO configure 2.2, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ ./configure --prefix=/home/jdh8d/umbrella/uvadev.peasoup/security_transforms
## --------- ##
## Platform. ##
## --------- ##
hostname = zephyr01
uname -m = x86_64
uname -r = 3.5.0-52-generic
uname -s = Linux
uname -v = #78~precise1-Ubuntu SMP Wed Jun 11 17:14:53 UTC 2014
/usr/bin/uname -p = unknown
/bin/uname -X = unknown
/bin/arch = unknown
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown
PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /sbin
PATH: /bin
PATH: /usr/games
PATH: /home/jdh8d/umbrella/uvadev.peasoup/grace/concolic/bin
PATH: /home/jdh8d/umbrella/uvadev.peasoup/grace/third-party/yices-sdk/1.0.34/linux32/bin
## ----------- ##
## Core tests. ##
## ----------- ##
configure:1802: checking for a BSD-compatible install
configure:1870: result: /usr/bin/install -c
configure:1881: checking whether build environment is sane
configure:1931: result: yes
configure:2072: checking for a thread-safe mkdir -p
configure:2111: result: /bin/mkdir -p
configure:2124: checking for gawk
configure:2140: found /usr/bin/gawk
configure:2151: result: gawk
configure:2162: checking whether make sets $(MAKE)
configure:2184: result: yes
configure:2322: checking for g++
configure:2338: found /usr/bin/g++
configure:2349: result: g++
configure:2376: checking for C++ compiler version
configure:2385: g++ --version >&5
g++ (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
configure:2396: $? = 0
configure:2385: g++ -v >&5
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.6/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.3-1ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)
configure:2396: $? = 0
configure:2385: g++ -V >&5
g++: error: unrecognized option '-V'
g++: fatal error: no input files
compilation terminated.
configure:2396: $? = 4
configure:2385: g++ -qversion >&5
g++: error: unrecognized option '-qversion'
g++: fatal error: no input files
compilation terminated.
configure:2396: $? = 4
configure:2416: checking whether the C++ compiler works
configure:2438: g++ conftest.cpp >&5
configure:2442: $? = 0
configure:2490: result: yes
configure:2493: checking for C++ compiler default output file name
configure:2495: result: a.out
configure:2501: checking for suffix of executables
configure:2508: g++ -o conftest conftest.cpp >&5
configure:2512: $? = 0
configure:2534: result:
configure:2556: checking whether we are cross compiling
configure:2564: g++ -o conftest conftest.cpp >&5
configure:2568: $? = 0
configure:2575: ./conftest
configure:2579: $? = 0
configure:2594: result: no
configure:2599: checking for suffix of object files
configure:2621: g++ -c conftest.cpp >&5
configure:2625: $? = 0
configure:2646: result: o
configure:2650: checking whether we are using the GNU C++ compiler
configure:2669: g++ -c conftest.cpp >&5
configure:2669: $? = 0
configure:2678: result: yes
configure:2687: checking whether g++ accepts -g
configure:2707: g++ -c -g conftest.cpp >&5
configure:2707: $? = 0
configure:2748: result: yes
configure:2782: checking for style of include used by make
configure:2810: result: GNU
configure:2836: checking dependency style of g++
configure:2947: result: gcc3
configure:3130: creating ./config.status
## ---------------------- ##
## Running config.status. ##
## ---------------------- ##
This file was extended by ELFIO config.status 2.2, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES =
CONFIG_HEADERS =
CONFIG_LINKS =
CONFIG_COMMANDS =
$ ./config.status
on zephyr01
config.status:785: creating Makefile
config.status:785: creating examples/Makefile
config.status:785: creating examples/elfdump/Makefile
config.status:785: creating examples/tutorial/Makefile
config.status:785: creating examples/writer/Makefile
config.status:785: creating examples/write_obj/Makefile
config.status:957: executing depfiles commands
## ---------------- ##
## Cache variables. ##
## ---------------- ##
ac_cv_cxx_compiler_gnu=yes
ac_cv_env_CCC_set=
ac_cv_env_CCC_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CXXFLAGS_set=
ac_cv_env_CXXFLAGS_value=
ac_cv_env_CXX_set=
ac_cv_env_CXX_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_objext=o
ac_cv_path_install='/usr/bin/install -c'
ac_cv_path_mkdir=/bin/mkdir
ac_cv_prog_AWK=gawk
ac_cv_prog_ac_ct_CXX=g++
ac_cv_prog_cxx_g=yes
ac_cv_prog_make_make_set=yes
am_cv_CXX_dependencies_compiler_type=gcc3
## ----------------- ##
## Output variables. ##
## ----------------- ##
ACLOCAL='${SHELL} /home/jdh8d/umbrella/uvadev.peasoup/security_transforms/third_party/ELFIO/elfio-2.2/missing --run aclocal-1.11'
AMDEPBACKSLASH='\'
AMDEP_FALSE='#'
AMDEP_TRUE=''
AMTAR='$${TAR-tar}'
AUTOCONF='${SHELL} /home/jdh8d/umbrella/uvadev.peasoup/security_transforms/third_party/ELFIO/elfio-2.2/missing --run autoconf'
AUTOHEADER='${SHELL} /home/jdh8d/umbrella/uvadev.peasoup/security_transforms/third_party/ELFIO/elfio-2.2/missing --run autoheader'
AUTOMAKE='${SHELL} /home/jdh8d/umbrella/uvadev.peasoup/security_transforms/third_party/ELFIO/elfio-2.2/missing --run automake-1.11'
AWK='gawk'
CPPFLAGS=''
CXX='g++'
CXXDEPMODE='depmode=gcc3'
CXXFLAGS='-g -O2'
CYGPATH_W='echo'
DEFS='-DPACKAGE_NAME=\"ELFIO\" -DPACKAGE_TARNAME=\"elfio\" -DPACKAGE_VERSION=\"2.2\" -DPACKAGE_STRING=\"ELFIO\ 2.2\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"elfio\" -DVERSION=\"2.2\"'
DEPDIR='.deps'
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EXEEXT=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
INSTALL_STRIP_PROGRAM='$(install_sh) -c -s'
LDFLAGS=''
LIBOBJS=''
LIBS=''
LTLIBOBJS=''
MAKEINFO='${SHELL} /home/jdh8d/umbrella/uvadev.peasoup/security_transforms/third_party/ELFIO/elfio-2.2/missing --run makeinfo'
MKDIR_P='/bin/mkdir -p'
OBJEXT='o'
PACKAGE='elfio'
PACKAGE_BUGREPORT=''
PACKAGE_NAME='ELFIO'
PACKAGE_STRING='ELFIO 2.2'
PACKAGE_TARNAME='elfio'
PACKAGE_URL=''
PACKAGE_VERSION='2.2'
PATH_SEPARATOR=':'
SET_MAKE=''
SHELL='/bin/bash'
STRIP=''
VERSION='2.2'
ac_ct_CXX='g++'
am__EXEEXT_FALSE=''
am__EXEEXT_TRUE='#'
am__fastdepCXX_FALSE='#'
am__fastdepCXX_TRUE=''
am__include='include'
am__isrc=''
am__leading_dot='.'
am__nodep='_no'
am__quote=''
am__tar='$${TAR-tar} chof - "$$tardir"'
am__untar='$${TAR-tar} xf -'
bindir='${exec_prefix}/bin'
build_alias=''
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
exec_prefix='${prefix}'
host_alias=''
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
install_sh='${SHELL} /home/jdh8d/umbrella/uvadev.peasoup/security_transforms/third_party/ELFIO/elfio-2.2/install-sh'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
mkdir_p='/bin/mkdir -p'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='/home/jdh8d/umbrella/uvadev.peasoup/security_transforms'
program_transform_name='s,x,x,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''
## ----------- ##
## confdefs.h. ##
## ----------- ##
/* confdefs.h */
#define PACKAGE_NAME "ELFIO"
#define PACKAGE_TARNAME "elfio"
#define PACKAGE_VERSION "2.2"
#define PACKAGE_STRING "ELFIO 2.2"
#define PACKAGE_BUGREPORT ""
#define PACKAGE_URL ""
#define PACKAGE "elfio"
#define VERSION "2.2"
configure: exit 0
This diff is collapsed.
This diff is collapsed.
AC_INIT([ELFIO], [2.2])
AM_INIT_AUTOMAKE([-Wall -Werror foreign])
AC_PROG_CXX
AC_CONFIG_FILES([
Makefile
examples/Makefile
examples/elfdump/Makefile
examples/tutorial/Makefile
examples/writer/Makefile
examples/write_obj/Makefile
])
AC_OUTPUT