Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 470884 | Differences between
and this patch

Collapse All | Expand All

(-)elfutils-0.155.orig/src/ld.h (-23 / +21 lines)
Lines 291-297 Link Here
291
  const char **(*lib_extensions) (struct ld_state *)
291
  const char **(*lib_extensions) (struct ld_state *)
292
       __attribute__ ((__const__));
292
       __attribute__ ((__const__));
293
#define LIB_EXTENSION(state) \
293
#define LIB_EXTENSION(state) \
294
  DL_CALL_FCT ((state)->callbacks.lib_extensions, (state))
294
  ((state)->callbacks.lib_extensions)(state)
295
295
296
  /* Process the given file.  If the file is not yet open, open it.
296
  /* Process the given file.  If the file is not yet open, open it.
297
     The first parameter is a file descriptor for the file which can
297
     The first parameter is a file descriptor for the file which can
Lines 302-313 Link Here
302
  int (*file_process) (int fd, struct usedfiles *, struct ld_state *,
302
  int (*file_process) (int fd, struct usedfiles *, struct ld_state *,
303
		       struct usedfiles **);
303
		       struct usedfiles **);
304
#define FILE_PROCESS(fd, file, state, nextp) \
304
#define FILE_PROCESS(fd, file, state, nextp) \
305
  DL_CALL_FCT ((state)->callbacks.file_process, (fd, file, state, nextp))
305
  ((state)->callbacks.file_process)(fd, file, state, nextp)
306
306
307
  /* Close the given file.  */
307
  /* Close the given file.  */
308
  int (*file_close) (struct usedfiles *, struct ld_state *);
308
  int (*file_close) (struct usedfiles *, struct ld_state *);
309
#define FILE_CLOSE(file, state) \
309
#define FILE_CLOSE(file, state) \
310
  DL_CALL_FCT ((state)->callbacks.file_close, (file, state))
310
  ((state)->callbacks.file_close)(file, state)
311
311
312
  /* Create the output sections now.  This requires knowledge about
312
  /* Create the output sections now.  This requires knowledge about
313
     all the sections we will need.  It may be necessary to sort the
313
     all the sections we will need.  It may be necessary to sort the
Lines 319-417 Link Here
319
     output routines.  */
319
     output routines.  */
320
  void (*create_sections) (struct ld_state *);
320
  void (*create_sections) (struct ld_state *);
321
#define CREATE_SECTIONS(state) \
321
#define CREATE_SECTIONS(state) \
322
  DL_CALL_FCT ((state)->callbacks.create_sections, (state))
322
  ((state)->callbacks.create_sections)(state)
323
323
324
  /* Determine whether we have any non-weak unresolved references left.  */
324
  /* Determine whether we have any non-weak unresolved references left.  */
325
  int (*flag_unresolved) (struct ld_state *);
325
  int (*flag_unresolved) (struct ld_state *);
326
#define FLAG_UNRESOLVED(state) \
326
#define FLAG_UNRESOLVED(state) \
327
  DL_CALL_FCT ((state)->callbacks.flag_unresolved, (state))
327
  ((state)->callbacks.flag_unresolved)(state)
328
328
329
  /* Create the sections which are generated by the linker and are not
329
  /* Create the sections which are generated by the linker and are not
330
     present in the input file.  */
330
     present in the input file.  */
331
  void (*generate_sections) (struct ld_state *);
331
  void (*generate_sections) (struct ld_state *);
332
#define GENERATE_SECTIONS(state) \
332
#define GENERATE_SECTIONS(state) \
333
  DL_CALL_FCT ((state)->callbacks.generate_sections, (state))
333
  ((state)->callbacks.generate_sections)(state)
334
334
335
  /* Open the output file.  The file name is given or "a.out".  We
335
  /* Open the output file.  The file name is given or "a.out".  We
336
     create as much of the ELF structure as possible.  */
336
     create as much of the ELF structure as possible.  */
337
  int (*open_outfile) (struct ld_state *, int, int, int);
337
  int (*open_outfile) (struct ld_state *, int, int, int);
338
#define OPEN_OUTFILE(state, machine, class, data) \
338
#define OPEN_OUTFILE(state, machine, class, data) \
339
  DL_CALL_FCT ((state)->callbacks.open_outfile, (state, machine, class, data))
339
  ((state)->callbacks.open_outfile)(state, machine, class, data)
340
340
341
  /* Create the data for the output file.  */
341
  /* Create the data for the output file.  */
342
  int (*create_outfile) (struct ld_state *);
342
  int (*create_outfile) (struct ld_state *);
343
#define CREATE_OUTFILE(state) \
343
#define CREATE_OUTFILE(state) \
344
  DL_CALL_FCT ((state)->callbacks.create_outfile, (state))
344
  ((state)->callbacks.create_outfile)(state)
345
345
346
  /* Process a relocation section.  */
346
  /* Process a relocation section.  */
347
  void (*relocate_section) (struct ld_state *, Elf_Scn *, struct scninfo *,
347
  void (*relocate_section) (struct ld_state *, Elf_Scn *, struct scninfo *,
348
			    const Elf32_Word *);
348
			    const Elf32_Word *);
349
#define RELOCATE_SECTION(state, outscn, first, dblindirect) \
349
#define RELOCATE_SECTION(state, outscn, first, dblindirect) \
350
  DL_CALL_FCT ((state)->callbacks.relocate_section, (state, outscn, first,    \
350
  ((state)->callbacks.relocate_section)(state, outscn, first, dblindirect)
351
						     dblindirect))
352
351
353
  /* Allocate a data buffer for the relocations of the given output
352
  /* Allocate a data buffer for the relocations of the given output
354
     section.  */
353
     section.  */
355
  void (*count_relocations) (struct ld_state *, struct scninfo *);
354
  void (*count_relocations) (struct ld_state *, struct scninfo *);
356
#define COUNT_RELOCATIONS(state, scninfo) \
355
#define COUNT_RELOCATIONS(state, scninfo) \
357
  DL_CALL_FCT ((state)->callbacks.count_relocations, (state, scninfo))
356
  ((state)->callbacks.count_relocations)(state, scninfo)
358
357
359
  /* Create relocations for executable or DSO.  */
358
  /* Create relocations for executable or DSO.  */
360
  void (*create_relocations) (struct ld_state *, const Elf32_Word *);
359
  void (*create_relocations) (struct ld_state *, const Elf32_Word *);
361
#define CREATE_RELOCATIONS(state, dlbindirect) \
360
#define CREATE_RELOCATIONS(state, dlbindirect) \
362
  DL_CALL_FCT ((state)->callbacks.create_relocations, (state, dblindirect))
361
  ((state)->callbacks.create_relocations)(state, dblindirect)
363
362
364
  /* Finalize the output file.  */
363
  /* Finalize the output file.  */
365
  int (*finalize) (struct ld_state *);
364
  int (*finalize) (struct ld_state *);
366
#define FINALIZE(state) \
365
#define FINALIZE(state) \
367
  DL_CALL_FCT ((state)->callbacks.finalize, (state))
366
  ((state)->callbacks.finalize)(state)
368
367
369
  /* Check whether special section number is known.  */
368
  /* Check whether special section number is known.  */
370
  bool (*special_section_number_p) (struct ld_state *, size_t);
369
  bool (*special_section_number_p) (struct ld_state *, size_t);
371
#define SPECIAL_SECTION_NUMBER_P(state, number) \
370
#define SPECIAL_SECTION_NUMBER_P(state, number) \
372
  DL_CALL_FCT ((state)->callbacks.special_section_number_p, (state, number))
371
  ((state)->callbacks.special_section_number_p)(state, number)
373
372
374
  /* Check whether section type is known.  */
373
  /* Check whether section type is known.  */
375
  bool (*section_type_p) (struct ld_state *, XElf_Word);
374
  bool (*section_type_p) (struct ld_state *, XElf_Word);
376
#define SECTION_TYPE_P(state, type) \
375
#define SECTION_TYPE_P(state, type) \
377
  DL_CALL_FCT ((state)->callbacks.section_type_p, (state, type))
376
  ((state)->callbacks.section_type_p)(state, type)
378
377
379
  /* Return section flags for .dynamic section.  */
378
  /* Return section flags for .dynamic section.  */
380
  XElf_Xword (*dynamic_section_flags) (struct ld_state *);
379
  XElf_Xword (*dynamic_section_flags) (struct ld_state *);
381
#define DYNAMIC_SECTION_FLAGS(state) \
380
#define DYNAMIC_SECTION_FLAGS(state) \
382
  DL_CALL_FCT ((state)->callbacks.dynamic_section_flags, (state))
381
  ((state)->callbacks.dynamic_section_flags)(state)
383
382
384
  /* Create the data structures for the .plt section and initialize it.  */
383
  /* Create the data structures for the .plt section and initialize it.  */
385
  void (*initialize_plt) (struct ld_state *, Elf_Scn *scn);
384
  void (*initialize_plt) (struct ld_state *, Elf_Scn *scn);
386
#define INITIALIZE_PLT(state, scn) \
385
#define INITIALIZE_PLT(state, scn) \
387
  DL_CALL_FCT ((state)->callbacks.initialize_plt, (state, scn))
386
  ((state)->callbacks.initialize_plt)(state, scn)
388
387
389
  /* Create the data structures for the .rel.plt section and initialize it.  */
388
  /* Create the data structures for the .rel.plt section and initialize it.  */
390
  void (*initialize_pltrel) (struct ld_state *, Elf_Scn *scn);
389
  void (*initialize_pltrel) (struct ld_state *, Elf_Scn *scn);
391
#define INITIALIZE_PLTREL(state, scn) \
390
#define INITIALIZE_PLTREL(state, scn) \
392
  DL_CALL_FCT ((state)->callbacks.initialize_pltrel, (state, scn))
391
  ((state)->callbacks.initialize_pltrel)(state, scn)
393
392
394
  /* Finalize the .plt section the what belongs to them.  */
393
  /* Finalize the .plt section the what belongs to them.  */
395
  void (*finalize_plt) (struct ld_state *, size_t, size_t, struct symbol **);
394
  void (*finalize_plt) (struct ld_state *, size_t, size_t, struct symbol **);
396
#define FINALIZE_PLT(state, nsym, nsym_dyn, ndxtosym) \
395
#define FINALIZE_PLT(state, nsym, nsym_dyn, ndxtosym) \
397
  DL_CALL_FCT ((state)->callbacks.finalize_plt, (state, nsym, nsym_dyn, \
396
   ((state)->callbacks.finalize_plt)(state, nsym, nsym_dyn, ndxtosym)
398
						 ndxtosym))
399
397
400
  /* Create the data structures for the .got section and initialize it.  */
398
  /* Create the data structures for the .got section and initialize it.  */
401
  void (*initialize_got) (struct ld_state *, Elf_Scn *scn);
399
  void (*initialize_got) (struct ld_state *, Elf_Scn *scn);
402
#define INITIALIZE_GOT(state, scn) \
400
#define INITIALIZE_GOT(state, scn) \
403
  DL_CALL_FCT ((state)->callbacks.initialize_got, (state, scn))
401
  ((state)->callbacks.initialize_got)(state, scn)
404
402
405
  /* Create the data structures for the .got.plt section and initialize it.  */
403
  /* Create the data structures for the .got.plt section and initialize it.  */
406
  void (*initialize_gotplt) (struct ld_state *, Elf_Scn *scn);
404
  void (*initialize_gotplt) (struct ld_state *, Elf_Scn *scn);
407
#define INITIALIZE_GOTPLT(state, scn) \
405
#define INITIALIZE_GOTPLT(state, scn) \
408
  DL_CALL_FCT ((state)->callbacks.initialize_gotplt, (state, scn))
406
  ((state)->callbacks.initialize_gotplt)(state, scn)
409
407
410
  /* Return the tag corresponding to the native relocation type for
408
  /* Return the tag corresponding to the native relocation type for
411
     the platform.  */
409
     the platform.  */
412
  int (*rel_type) (struct ld_state *);
410
  int (*rel_type) (struct ld_state *);
413
#define REL_TYPE(state) \
411
#define REL_TYPE(state) \
414
  DL_CALL_FCT ((state)->callbacks.rel_type, (state))
412
  ((state)->callbacks.rel_type)(state)
415
};
413
};
416
414
417
415

Return to bug 470884