~ubuntu-branches/ubuntu/raring/ipxe/raring

« back to all changes in this revision

Viewing changes to src/util/elf2efi.c

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2012-11-14 15:47:31 UTC
  • mfrom: (1.1.3)
  • Revision ID: package-import@ubuntu.com-20121114154731-jhuy5d1h2jw75qe9
Tags: 1.0.0+git-4.d6b0b76-0ubuntu1
* New upstream snapshot:
  - d/p/iscsi*.patch: Dropped - included in snapshot.
  - Refreshed all other patches.
* d/p/enable-https.patch: Enable HTTPS support (LP: #1025239).

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
 *
14
14
 * You should have received a copy of the GNU General Public License
15
15
 * along with this program; if not, write to the Free Software
16
 
 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
16
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 
17
 * 02110-1301, USA.
17
18
 */
18
19
 
19
20
#define _GNU_SOURCE
405
406
                          EFI_IMAGE_SCN_MEM_WRITE );
406
407
                applicable_start = &data_mid;
407
408
                applicable_end = &data_end;
 
409
        } else {
 
410
                eprintf ( "Unrecognised characteristics %#lx for section %s\n",
 
411
                          flags, section->name );
 
412
                exit ( 1 );
408
413
        }
409
414
 
410
415
        /* Copy in section contents */
459
464
 * @v rel               Relocation entry
460
465
 * @v pe_reltab         PE relocation table to fill in
461
466
 */
462
 
static void process_reloc ( bfd *bfd, asection *section, arelent *rel,
 
467
static void process_reloc ( bfd *bfd __attribute__ (( unused )),
 
468
                            asection *section, arelent *rel,
463
469
                            struct pe_relocs **pe_reltab ) {
464
470
        reloc_howto_type *howto = rel->howto;
465
471
        asymbol *sym = *(rel->sym_ptr_ptr);
637
643
        for ( section = pe_sections ; section ; section = section->next ) {
638
644
                if ( fseek ( pe, section->hdr.PointerToRawData,
639
645
                             SEEK_SET ) != 0 ) {
640
 
                        eprintf ( "Could not seek to %lx: %s\n",
 
646
                        eprintf ( "Could not seek to %x: %s\n",
641
647
                                  section->hdr.PointerToRawData,
642
648
                                  strerror ( errno ) );
643
649
                        exit ( 1 );
786
792
        struct options opts = {
787
793
                .subsystem = EFI_IMAGE_SUBSYSTEM_EFI_APPLICATION,
788
794
        };
789
 
        unsigned int infile_index;
 
795
        int infile_index;
790
796
        const char *infile;
791
797
        const char *outfile;
792
798