| 743 | } |
| 744 | |
| 745 | int rmodule_create(const struct buffer *elfin, struct buffer *elfout) |
| 746 | { |
| 747 | struct rmod_context ctx; |
| 748 | int ret = -1; |
| 749 | |
| 750 | if (rmodule_init(&ctx, elfin)) |
| 751 | goto out; |
| 752 | |
| 753 | if (rmodule_collect_relocations(&ctx, NULL)) |
| 754 | goto out; |
| 755 | |
| 756 | if (populate_rmodule_info(&ctx)) |
| 757 | goto out; |
| 758 | |
| 759 | if (write_elf(&ctx, elfin, elfout)) |
| 760 | goto out; |
| 761 | |
| 762 | ret = 0; |
| 763 | |
| 764 | out: |
| 765 | rmodule_cleanup(&ctx); |
| 766 | return ret; |
| 767 | } |
| 768 | |
| 769 | static void rmod_deserialize(struct rmodule_header *rmod, struct buffer *buff, |
| 770 | struct xdr *xdr) |
no test coverage detected